I'm working on a little script to scp my calendar ICS files to a remote web server when I log in each morning.
Unfortunately, I'm finding the AppleScript syntax a little confusing, so what's below is as far as I've made it.
Any tips on how to do the following:
1. Set it only prompt me the first time I logic each day
2. Make it wait to quit the Terminal until it's finished scp'ing the calendars
would be much appreciate.
The script:
tell application "Finder"
display dialog "Synchronize Calendars?"
set mySync to the result
if the button returned of mySync is "OK" then
try
activate
with timeout of 60 seconds
tell application "Terminal"
activate
do script with command "/usr/bin/scp ~jreades/Library/Calendars/*.ics
xxx@yyy.com:Calendars/"
end tell
idle
end timeout
end try
tell application "Terminal" to quit
end if
end tell