ono44

Q: applescript stopped working, error -1708

Hi,

 

Applescript has stopped functioning on my computer as of yesterday.

 

No applescripts are working. The problem has appeared on four other Macs in our office.

 

Here is a sample of what I am seeing running the script in ScriptEditor:

 

tell application "Finder"

          try

       mount volume "afp://10.143.2.217/Production_FP/"

  end try

end tell

 

Results in:

 

tell application "Finder"

mount volume "afp://10.143.2.217/Production_FP/"

  --> error number -1708

«event ascrgdut»

  --> error number -1708

mount volume "afp://10.143.2.217/Production_FP/"

  --> error number -1708

end tell

 

I am seeing the same error code whatever AppleScript I run.

 

Running on a Mac Pro 2.26 GHz Quad-Core Intel Xeon, MacOS 10.8.4.

 

I have restored various files from the Time Machine backup, but none of them has fixed the problem.

 

Could anyone please tell me which files I should try to restore, or any other way to fix the problem.

Mac Pro, OS X Mountain Lion (10.8.4)

Posted on Jun 27, 2013 4:04 AM

Close

Q: applescript stopped working, error -1708

  • All replies
  • Helpful answers

  • by red_menace,

    red_menace red_menace Jun 27, 2013 3:18 PM in response to ono44
    Level 6 (15,526 points)
    Desktops
    Jun 27, 2013 3:18 PM in response to ono44

    That particular error is from using a scripting addition command inside an application tell statement, but normally it doesn't keep the script from running.  The mount volume command is from StandardAdditions, not the Finder, so when you tell the Finder to perform the command, it doesn't know what it is (error -1708 is "the AppleEvent was not handled by any handler") and passes it back up the call chain.  What other errors are you seeing?

  • by ono44,

    ono44 ono44 Jun 28, 2013 2:13 AM in response to red_menace
    Level 1 (0 points)
    Jun 28, 2013 2:13 AM in response to red_menace

    Here is another sample of the error.

     

    This is from a a script to create a slug in InDesign.

     

    tell application "Adobe InDesign CS6"

              get font "Arial Narrow"

                        --> font "Arial Narrow"

              set properties of text defaults of active document to {applied font:font "Arial Narrow", font style:"regular", capitalization:normal, justification:left}

              activate

              get active document

                        --> document id 1

              count every page of active document

                        --> 1

              get page 1 of active document

                        --> page id 208 of spread id 203 of document id 1

              get layer "Slug" of document id 1

                        --> layer id 261 of document id 1

              set active layer of active window to layer "Slug" of document id 1

              get name of document id 1

                        --> "Untitled-1"

              exists swatch "sluggreen" of document id 1

                        --> true

              exists swatch "slugorange" of document id 1

                        --> true

              get active page of active window

                        --> page id 208 of spread id 203 of document id 1

              set slug bottom offset of document preferences of document id 1 to "40mm"

              set slug top offset of document preferences of document id 1 to "10mm"

              set slug inside or left offset of document preferences of document id 1 to "10mm"

              set slug right or outside offset of document preferences of document id 1 to "10mm"

              set horizontal measurement units of view preferences of document id 1 to millimeters

              set vertical measurement units of view preferences of document id 1 to millimeters

              get page width of document preferences of document id 1

                        --> 419.999999999167

              get page height of document preferences of document id 1

                        --> 296.999999999461

              round 419.999999999167

                        --> error number -1708

              «event ascrgdut»

                        --> error number -1708

              round 419.999999999167

                        --> error number -1708

    Result:

    error "Adobe InDesign CS6 got an error: 419.999999999167 doesn’t understand the round message." number -1708 from 419.999999999167

     

     

    It is also not running any of the applescripts I use within FileMaker Pro.

     

    Here is a sample of one I use to create folders on our server:

     

    tell current application

    do shell script "mkdir '/Volumes/Production_FP/test' 2> /dev/null"

    Result:

    error "\"mkdir '/Volumes/Production_FP/test' 2> /dev/null\" doesn’t understand the do shell script message." number -1708 from "mkdir '/Volumes/Production_FP/test' 2> /dev/null"

     

    All these scripts did work a few days ago, and still work on other identical computers.

     

    I have tried replacing the System/Library/ScriptingAdditions folder from the Time Machine backup, but this has not helped.

  • by red_menace,

    red_menace red_menace Jun 28, 2013 5:53 AM in response to ono44
    Level 6 (15,526 points)
    Desktops
    Jun 28, 2013 5:53 AM in response to ono44

    That is the same kind of error - the round command is also from StandardAdditions.  This error normally doesn't stop the script, it is just passed up until something knows what it is, which is usually AppleScript.  I'm not sure why this is failing on multiple machines, but you might try targeting the StandardAdditons commands to the script/application, for example:

     

      tell me to round whatever


  • by ono44,

    ono44 ono44 Jun 28, 2013 6:38 AM in response to red_menace
    Level 1 (0 points)
    Jun 28, 2013 6:38 AM in response to red_menace

    I have tried that, and got the following response:

     

    tell current application

    round 2.5

    Result:

    error "2.5 doesn’t understand the round message." number -1708 from 2.5

     

    Could there be a problem with the StandardAdditions file?

  • by ono44,

    ono44 ono44 Jun 28, 2013 6:56 AM in response to ono44
    Level 1 (0 points)
    Jun 28, 2013 6:56 AM in response to ono44

    I have replace the StandardAdditions file with a three-week old version from Time Machine and rebooted but no difference.

  • by red_menace,Solvedanswer

    red_menace red_menace Jun 28, 2013 7:13 AM in response to ono44
    Level 6 (15,526 points)
    Desktops
    Jun 28, 2013 7:13 AM in response to ono44

    AppleScript is supposed to redirect the command to the current application for compatibility with earlier versions.  Did this start after a software update or something?  You might try running the 10.8.4 combo update, which tends to clean things up a little bit better than the delta update.

  • by ono44,

    ono44 ono44 Jun 28, 2013 8:58 AM in response to red_menace
    Level 1 (0 points)
    Jun 28, 2013 8:58 AM in response to red_menace

    Great. Running that update on each of the affected machines has fixed the problem.

    Many thanks.