applescript wont work

Discussion in 'Mac Basics and Help' started by numlock, Jul 23, 2007.

  1. numlock macrumors 68000

    Mar 13, 2006
    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?

  2. GimmeSlack12 macrumors 603


    Apr 29, 2005
    San Francisco
    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 It has some great forums that help a lot with Applescript.

Share This Page