2 Replies Latest reply on Mar 28, 2014 5:52 PM by rwilley66

    Calculated Applescript Formula Not Working

    rwilley66

      Title

      Calculated Applescript Formula Not Working

      Post

           I have the following AppleScript calculation:

           "tell application \"Reminders\" set mylist to list \"Reminders\" tell mylist make new reminder with properties {name:" & Engagement:ToDo::ToDo & "due date:(date " & Engagement:ToDo::Due Date & " " & Engagement:ToDo::Due Time & "), remind me date:(date " & Engagement:ToDo::Due Date & " " & Engagement:ToDo::Due Time & ")} end tell"

           When I run the script, I get two errors. The first says "Expected end of line but found "set"." When I click OK to that error, I then get the error "Unknown Error: -2741".

           Can anyone see what the problem is with my formula that would generate these errors? Thanks.

        • 1. Re: Calculated Applescript Formula Not Working
          rwilley66

               I've gotten a bit further. My AppleScript calculation now looks like this:

               "tell application \"Reminders\" ¶ set mylist to list \"Reminders\" ¶ tell mylist ¶ make new reminder with properties {name:\"" & Engagement:ToDo::ToDo & "\", due date:(date " & Engagement:ToDo::Due Date & " " & Engagement:ToDo::Due Time & "), remind me date:(date " & Engagement:ToDo::Due Date & " " & Engagement:ToDo::Due Time & ")} ¶ end tell ¶ end tell"

               Now when I run it, I get the error -- Expected "," but found number. -- then after clicking OK I get the error -- Unknown Error: -2741 --. I feel that I'm almost there just missing something simple I hope.

          • 2. Re: Calculated Applescript Formula Not Working
            rwilley66

                 It took me a little more time staring at the code and I finally saw what my problem was. I have corrected the problem and now my AppleScript works!