Re: Repeat
Re: Repeat
- Subject: Re: Repeat
- From: Rob Jorgensen <email@hidden>
- Date: Wed, 21 May 2003 12:49:02 -0400
At 8:52 AM -0300 5/21/03, Marcus Rodrigues wrote:
Hi, i was tryng to do the following:
Open in Safari, in intervals of one hour, a random page. I think i got
it, but i want the pages to load in the same window, not in another...
How do i script this part?
Here is what i have done till this moment:
tell application "Safari"
activate
set theURL to {"http://www.apple.com.br";, "http://www.apple.com"}
repeat
open location (some item of theURL)
delay (60 * 60)
end repeat
end tell
If you save this as a stay-open application, it might do what you
want without the overhead associated with "delay". It works on the
front document/window.
on idle
set theURL to {"
http://www.apple.com.br";, "
http://www.apple.com"}
tell application "Safari"
activate
set URL of front document to (some item of theURL)
end tell
return (60 * 60)
end idle
It might be prudent to add code to make sure that a document/window exists.
--
Rob Jorgensen
Ohio, USA
_______________________________________________
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.
References: | |
| >Repeat (From: Marcus Rodrigues <email@hidden>) |