On 20/11/2008, Jo_y wrote in message <2736d87a-dd41-444a-8308-
d439f8aec647 RemoveThis @v38g2000yqb.googlegroups.com>:
> return 5 * minutes
> -> stays for delay too?
To expand on Jerry's answer, you should not be trying to be using a
'delay' command yourself. The language knows that an 'on idle' look works
a particular way. So you use the structure like the following:
on idle
... do some things ...
return 180
end idle
The language runs the commands in the 'idle' handler, then it looks at the
number the 'idle' handler returned. Then the language waits that number
of seconds. Here it's 180 which is 3*60, so it will wait three minutes.
Then it calls the idle handler again, and it keeps going around and around
until it hits a 'quit' command.
You don't need to use any 'delay' commands yourself.
Simon.
--
http://www.hearsay.demon.co.uk >> Stay informed about: how to run applescript as a background process?