Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

numlock

macrumors 68000
Original poster
Mar 13, 2006
1,590
88
I copied an applescript from the internet to make one for backing up ical and address book.

Here it is
tell application "iCal" to activate
tell application "System Events"
tell menu item "Back up Database..." of menu "File" of menu bar 1 of application process "iCal" to click
delay 3
keystroke "iCal" & todaysDate
keystroke "d" using command down
delay 3
keystroke tab
keystroke return
delay 5
end tell

I added it to an automator workflow for the complete backup process, It works fine on my intel imac but when tried on the ibook its supposed to run on i always get this error

system events got an error "nsreceiverevaluationscripterror:4"

can anyone tell me why this only pops up on the ibook and how i can fix it?

regards
 
Have you turned on GUI scripting? You can do this by looking in System Prefs> Universal Access. Somewhere in there is an option for User Interface scripting. I'm not at my Mac so I can't say exactly.

EDIT: Go to Applications>AppleScript>Applescript Utility and that has the option also. In Universal Access the button is Assistive Devices at the bottom of the screen.

If that doesn't do it then go check out macscripter.net It has some great forums that help a lot with Applescript.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.