• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Load several webpages in succession
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Load several webpages in succession


  • Subject: Re: Load several webpages in succession
  • From: Marc Myers <email@hidden>
  • Date: Mon, 14 May 2007 18:28:32 -0600

On May 14, 2007, at 11:59 AM, email@hidden wrote:
From: Timothy Hellum <email@hidden>
Subject: Load several webpages in succession
To: <email@hidden>
Message-ID: <C26E0D20.12D7F%email@hidden>
Content-Type: text/plain; charset="us-ascii"

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

The other solutions I've seen try to update the same document window with three different URLs within a few seconds. This one uses as many document windows as there are URLs in the list and makes sure that there are enough document windows open:


global uList, uCnt

set uList to {"http://www.URL1.com";, "http://www.URL2.com";, "http://www.URL3.com";, "http://www.URL4.com"}

tell application "Safari"
	set uCnt to count uList
	set dCnt to count documents
	set newDocs to uCnt - dCnt
	if newDocs > 0 then
		repeat newDocs times
			make new document at end of documents
		end repeat
	end if
end tell

on idle {}
	repeat with i from 1 to uCnt
		tell application "Safari"
			activate
			set URL of document i to item i of uList
		end tell
	end repeat
	return 60
end idle
--
"Reality is that which refuses to go away when I stop believing in it."
  -- Phillip K. Dick

_______________________________________________
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
  • Prev by Date: Re: Filemaker 8.5 stored applescript problem
  • Next by Date: Re: Filemaker 8.5 stored applescript problem
  • Previous by thread: Re: Load several webpages in succession
  • Next by thread: Re: Load several webpages in succession
  • Index(es):
    • Date
    • Thread