Re: Load several webpages in succession
Re: Load several webpages in succession
- Subject: Re: Load several webpages in succession
- From: Timothy Hellum <email@hidden>
- Date: Mon, 14 May 2007 14:05:56 -0400
- Thread-topic: Load several webpages in succession
Title: Re: Load several webpages in succession
Hmm. Ok that makes sense. I just selected/copied his script and pasted into Script Editor. What should the character look like that is not being represented properly, and how do I access that character?
/timothy
On 14/5/07 13:58, entity "Bruce Carter" <email@hidden> expostulated:
Timothy,
You guys may have a text format issue going, or it may have just been a typo, but your script has (verbally, to avoid the same possible format issue) "if j equals 2 then", while Deivy's has "if j is less than or equal to 2 then". The logic in your copy is wrong, since if you set j to 1 and then only increment it if it equals 2, it will never get incremented, will always get reset to 1, hence always showing the first page.
On May 14, 2007, at 1:52 PM, Timothy Hellum wrote:
Thanks for this,
But it appears to just list the same (first) web page in the list over and over again. Here is the script after I modified the sites to visit:
set j to 1
on idle {}
global j
set lista to {"http://www.theglobeandmail.com", "http://www.reportonbusiness.com/", "http://www.theglobeandmail.com/international/"}
tell application "Safari"
activate
set URL of front document to item j of lista
end tell
if j = 2 then
set j to j + 1
else
set j to 1
end if
return 10
end idle
??
/timothy
On 14/5/07 13:30, entity "deivy petrescu" <email@hidden> expostulated:
On May 14, 2007, at 12:57, Timothy Hellum wrote:
> Good afternoon,
>
> I have a simple script that allows me to load and refresh a
> website. However, ideally, I would have a script that loads
> several websites in succession with a wait time of 5 minutes
> between sites.
>
> Anyone know how to do this?
>
> The script so far (as collected off the web):
>
> on idle
>
> tell application "Safari"
> activate
> set URL of front document to "http://www.theglobeandmail.com"
> end tell
>
>
> return 60
>
>
> end idle
>
> Any help much appreciated.
>
> /timothy
>
>
> -------------------------------
> Timothy Hellum
> Editorial IT Support
> The Globe and Mail
> http://www.theglobeandmail.com
> _______________________________________________
Timothy,
the script below cycles over 3 URL's every 10 seconds.
Change it accordingly
<script>
set j to 1
on idle {}
global j
set lista to {"http://www.theglobeandmail.com", "http://
www.nyt.com <http://www.nyt.com> ", "http://www.gazetaesportiva.net"}
tell application "Safari"
activate
set URL of front document to item j of lista
end tell
if j = 2 then
set j to j + 1
else
set j to 1
end if
return 10
end idle
</script>
Deivy
-------------------------------
Timothy Hellum
Editorial IT Support
The Globe and Mail
http://www.theglobeandmail.com
_______________________________________________
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
--
Bruce Carter, Senior Systems Engineer http://www.nd.edu/~bcarter/
Center for Creative Computing, University of Notre Dame, Notre Dame, IN 46556
-------------------------------
Timothy Hellum
Editorial IT Support
The Globe and Mail
http://www.theglobeandmail.com
_______________________________________________
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