Keeping a text-entry in the background, or a work-around
Keeping a text-entry in the background, or a work-around
- Subject: Keeping a text-entry in the background, or a work-around
- From: Clint Hoxie <email@hidden>
- Date: Thu, 29 Nov 2007 10:42:21 -0700
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 looked for a solution online, but don't have enough
experience to know what resources I need. Can anyone help? The script
is pasted below.
Thanks.
Clint
-----------------------------------
-- an applescript program that opens a list of urls in separate tabs.
-- opens safari, opens a window, then loads each url in a separate tab.
-- written by alvin alexander, devdaily.com
-- further developed and modified by Clint Hoxie
-- no rights reserved, feel free to copy and improve this program.
set urlList to {"dogpile.com", "http://www.littlegolem.net/"}
set numURLs to (count urlList)
tell application "Safari"
activate
tell application "System Events"
-- open a new window to save open tabs
tell process "Safari"
click menu item "New Window" of menu "File" of menu bar 1
end tell
-- enter the url in the open window
keystroke (item 1 of urlList)
key code 36
repeat with i from 2 to (numURLs)
-- 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
-- now enter the url
keystroke (item i of urlList)
key code 36
end repeat
end tell
end tell
_______________________________________________
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