David,

What you have written below is correct given what you want to do. The 
timer methods within the Window-Eyes Scripts object do not repeat, so 
calling StartTimer again inside your timer proc is the correct way to 
ensure it fires every 1.5 seconds.

You would use StopTimer if you wanted to cancel the next firing of your 
timer proc.

HTH,
Steve


On 2/20/2015 12:25 AM, David via Scripting wrote:
> I have the following frame code:
>
> Dim TimerID: TimerID = StartTimer( 1500, "MyTimer")
>
> Sub MyTimer()
>     ' Do my stuff.
>     TimerID = StartTimer( 1500, "MyTimer")
> End Sub 'MyTimer.
>
> This code is meant to perform a certain small test, every 1.5 second. 
> After performing the action, it should restart the timer, and 1.5 
> seconds later, do the same test over again. The procedure is meant to 
> run permanently, long as the app is running.
>
> What I wonder, is if I need to use the StopTimer instruction, before I 
> call the StartTimer for next interval. If I do not use the StopTimer, 
> will it automatically reset the StartTimer when I call it next time? 
> Or, is the StopTimer necessary to clear up anything in this process?
>
> Hope my question made sense. Thanks for your input.
>
>

_______________________________________________
Any views or opinions presented in this email are solely those of the author 
and do not necessarily represent those of Ai Squared.

For membership options, visit 
http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/archive%40mail-archive.com.
For subscription options, visit 
http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com
List archives can be found at 
http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com

Reply via email to