2 Replies Latest reply on Jul 1, 2014 5:02 AM by SamLaundon

    Exit Javascript

    SamLaundon Level 1

      I have converted my Configurator panels to HTML5. I am experiencing a problem that I can't resolve.


      In Photoshop CC my new panel will run a command like "Auto Tone", but if I try to undo with the shortcut key command+Z nothing happens. I have to use the "Undo" button I created in the panel. Or if I click on a tool in the tools pallet and then try command+Z the undo shortcut works.


      Here is an example script:

      /*Auto Tone*/

      function selAutotone(){ErrStrs = {};

      ErrStrs.USER_CANCELLED=localize("$$$/ScriptingSupport/Error/UserCancelled=User cancelled the operation");

      try {var idLvls = charIDToTypeID( 'Lvls' );    

          var desc853 = new ActionDescriptor();    

          var idAuto = charIDToTypeID( 'Auto' );    

          desc853.putBoolean( idAuto, true ); executeAction( idLvls, desc853, DialogModes.ALL );

          } catch(e){if (e.toString().indexOf(ErrStrs.USER_CANCELLED)!=-1) {;

                  } else{alert(localize("$$$/ScriptingSupport/Error/CommandNotAvailable=The command is currently not available"));}}



      I am so close to publishing this panel, but this issue is holding it up.


      Thanks in advance - Sam