View Single Post
  #8  
Old August 12th, 2003, 07:19 AM
bluehz bluehz is offline
Registered User
 
Join Date: Jan 2002
Posts: 115
Thanks: 0
Thanked 0 Times in 0 Posts
bluehz is on a distinguished road
Here's a little script I use that runs automatically every morning before I wake up. Then when I get my mornig coffee I can just sit down and all my news pages, etc are already open. While not strictly an AppleScript, it might help you out. This is a shell script that is launched by cron at a specified time.

1. Create the text file (aake sure its TEXT not RTF) and enter the following:

#!/bin/sh

#
# functions
#
# opennew is a function to create a new Safari window
opennew () {
osascript <<EOF
tell application "Safari"
activate
make new document at beginning of documents
end tell
EOF
sleep 5
}

# open a new Safari window then loads the urls listed below into that new
window.
# note the last url in the list does NOT have a trailing fwd slash
opennew
open "http://url1" \
"http://url2" \
"http://url3" \
"http://url4"

# open another window, load more urls
opennew
open "http://url5" \
"http://url6" \
"http://url7" \
"http://url8"

2. Save the file and change permissions to executable (chmod 755 filename).

3. Setup a cron task to launch the file at a specific time, or you can run it manually
Reply With Quote