4 Replies Latest reply on Jan 24, 2011 6:20 AM by david_a_clark

    [PS] AS3 suspendHistory() bug?

    DavideBarranca Level 1

      Hello,

      I can be wrong (and that's a real possibility ), but there's something bizarre happening with CS SDK and the Photoshop suspendHistory() method working in ActionScript.

       

      According to the API documentation, the parameters are:



      historyString
      :String
      (String)The string to use for the history state.

      javaScriptString:String — (String) A string of JavaScript code to execute during the suspension of history.

       

      Currently I'm constantly getting this "Error: General Photoshop error occurred. This functionality may not be available in this version of Photoshop"

       

      An excerpt of the code is as follows:

       

      app.activeDocument.suspendHistory("Private stuff!", "app.activeDocument.duplicate()")

       

      The Javascript string should be ok....

      I would have liked to have an ActionScript:String instead (it'll be quite annoying to step in and out, AS3 and JS)... so just to try, I've substituted it with "var myDoc:Document = app.activeDocument.duplicate()" with no luck.

      Could someone else try to test this method, please?

      Thanks in advance,

       

      Davide