Re: Timed loop
Re: Timed loop
- Subject: Re: Timed loop
- From: Ed Stockly <email@hidden>
- Date: Thu, 22 Nov 2007 09:53:05 -0800
set jetzt to current date set dann to jetzt + 10 * minutes repeat until (current date) >= dann delay 10 -- do your work here. I chose a delay because I have nothing to do end repeat
That loop could be replaced with a single line:
delay 600
So, if there is nothing to do inside your loop, you don't need to loop at all.
However, if there is work to be done within your loop then I'd try something like this:
repeat 60 times --do some stuff delay 10 end repeat
I prefer not making multiple calls to OSAX when not needed, and getting the current date multiple times is not needed here.
HTH ES =
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden