a "repeat" before a "on idle"
a "repeat" before a "on idle"
- Subject: a "repeat" before a "on idle"
- From: Antonio Inojal <email@hidden>
- Date: Sat, 31 Aug 2002 23:45:45 -0400
Hello. I am currently making a test on a script which is idle for 5
seconds but which repeats nevertheless. I have found that a script which
begins with on idle will end as soon as it hits "end idle". Maybe if you
make the script an application which stays open, it will continue but ,
and correct me if I am wrong, variable data will be lost. ( To
illustrate this look at the code below and see that "i" is first given a
value of 5, then 7. What I would like is that when the script repeats in
the beginning, "i" still has a value of 7) Now, when I place a repeat
statement before all other source, and below it I place an 'on idle' ,
it gives me some error about it waiting for the end of repeat and
encountered on idle:
repeat
on idle
tell application "Finder"
set i to 5
set i to 7
beep
end tell
return 5
end idle
end repeat
Now my guess is, one cannot repeat or do any other thing before a 'on
idle'. My problem is this: Like my script shows, I would like it to
repeat the code inside a repeat statement, yet while inside, I would
like it to wait up 5 seconds and then repeat, again. Now, I could put
the on idle on the top, but then my script wouldn't even be idle. As I
have stated, the above code does not work for me. If you know of another
way of repeating yet being able to be idle for a certain amount of time
please tell me. Or if I am doing things backward in anyway and you know
a better way, I appreciate your feedback.
Tony
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.