OK. Best wishes for success.
You're writing to a file on your disk every second. It's not necessarily a problem (in theory, shortens disk life, but may be hard to quantify), but you could simply handle this with strings (variables) if you wanted to do that as an alternative.
It's interesting to see what happens with threads when you have a timed loop containing a sleep. It might be the case that, with a sleep of 1000 ms, a timer interval of anything less (shorter) than this duration yields no difference in the approximate loop frequency of one second. For fun, you can try the following script, but predict what you think will happen before you run it (I already gave away the answer
Code: Select all
SetTimer, Test, 1
SoundBeep, 1500, 20
Next, change the timer interval to 1000, and run it again.
I recommend ending your subroutine with Return