Can someone give me advice on how I could improve this applescript. I just want it to click the ok button in a dialog box which comes up when the program first opens and again when a dialog box comes up after it completes it's processes. This is the only way I figured out how to do it but I would suspect there is an easier way and there might be an occasion when the process takes over 100 seconds. This is my first adventure into using applescript. My next step is to use automater in combination with sailing clicker and isync to automate my calendar, etc. on my phone everytime I walk into work.
tell application "Finder"
activate
select Finder window 1
open application file "Sync Entourage-iCal.app" of folder "Sync Entourage-iCal 2" of folder "Applications" of startup disk
end tell
tell application "System Events"
tell process "Sync Entourage-iCal.app"
delay 10
keystroke return
delay 100
keystroke return
end tell
end tell
tell application "Finder"
activate
select Finder window 1
open application file "Sync Entourage-iCal.app" of folder "Sync Entourage-iCal 2" of folder "Applications" of startup disk
end tell
tell application "System Events"
tell process "Sync Entourage-iCal.app"
delay 10
keystroke return
delay 100
keystroke return
end tell
end tell