1 Reply Latest reply: Feb 17, 2013 10:43 AM by LinusF3 RSS

    The reason for "Error 22: Window has no constuctor" errors

    Miller Hare Ltd

      I've spent the last day tracking down the reason you sometimes get these errors in photoshop CS5 and 5.5 (and probably in 6, but I don't have that yet).

       

      If you search for this problem most people recommend trashing the photoshop preferences, and most of the time that works. However, it didn't for me, and anyway trashing prefs always feels a bit cargo-cult, so I dug a bit deeper.

       

      Using the ExtendScript Toolkit, it was clear that when photoshop loaded, ScriptUI was not getting created - any of the objects associated with ScriptUI returned undefined in the console, but the rest of ExtendScript was up and running. Even more odd was that these objects DID exist right up until you started Photoshop.

       

      Turns out that our CS5  install has TWO copies of the ScriptingSupport.8li plug in - one in /Plug-ins/Extensions the other in /Plug-ins/Automate. Photoshop seems fine with multiple copies of a plugin, and only loads one of them. However, only the plugin in /Extensions has the additional ScriptUIFlexServer.swf, ScriptUIFlexServer-app.xml and ScriptUIFlexPhotoshop.swf files alongside it that appear to be necessary for ScriptUI to load properly. This appears to be a historical side-effect of the way we install CS, but it's a pretty easy situation to get into.

       

      So, when Photoshop starts it chooses which of the plugins to load and if it loads the one in /Automate, ScriptUI is broken and anything that tries to open a window fails with Error 22.

      However, photoshop also caches the plugin locations, so once it's loaded the wrong one, it always does so, until you trash the preferences, whereupon it chooses which one to load again.

      This is why deleting the prefs works most of the time, even for our installation.

       

      The real solution, though, is to make sure you have only one plugin that has the ScriptUI files with it

      For us, this meant deleting ScriptingSupport.8li from /Plug-ins/Automate, but you might find you need to reinstall the ScriptUI files

       

       

      Here's hoping that this helps everyone else with this problem that couldn't solve it by deleting preferences.

       

      Mike Trinder

      Miller Hare Ltd

      www.millerhare.com

        • 1. Re: The reason for "Error 22: Window has no constuctor" errors
          LinusF3

          I've used the CS6 AUTOMATE|PHOTOMERGE command many times.  Today I ended up with the Error 22 message.  After reading your message I did a search on my Win7 Pro 64 bit machine and got a number of hits for "scriptingsupport.8li". 

          1 for CS6 (on my machine)

          2 for CS5 (no longer on my machine)

          2 for Elements 8 (no longer on my machine but I DO have Elements 10 & 11 on it)

          2 for CS# (no longer on my machine)

           

          QUESTION:  Should I delete some of these and which?  Will deletion(s) suffice?