Re: Keeping a text-entry in the background, or a work-around
Re: Keeping a text-entry in the background, or a work-around
- Subject: Re: Keeping a text-entry in the background, or a work-around
- From: Malcolm Fitzgerald <email@hidden>
- Date: Fri, 30 Nov 2007 10:07:04 +1100
On 30/11/2007, at 4:42 AM, Clint Hoxie wrote:
I'm new on the list, so I apologize if this post doesn't match usual
etiquette.
I've copied a script from Alvin Alexander and then modified it a bit.
It is intended to open some URLs for me on a repeating basis. I have
the script saved as an application bundle which is called as an alarm
by iCal. My difficulty is that the script requires a keyboard command
to enter the URL, which means that I can't be touching the machine
when the script runs, or I likely interfere with its successful
execution.
I think that the most recent Safari allows you to create new tabs via
applescript. I don't have it to try. This works for older versions:
set urlList to {"http://dogpile.com", "http://www.littlegolem.net/"} --
urls require "http://"
tell application "Safari" to activate
repeat with i from 1 to (count urlList)
tell application "System Events"
-- for each additional url, first create a tab
tell process "Safari"
click menu item "New Tab" of menu "File" of menu bar 1
end tell
end tell
tell application "Safari"
set URL of document 1 to (item i of urlList) -- top tab is always
document 1
end tell
end repeat
malcolm
_______________________________________________
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