10 Replies Latest reply on Apr 14, 2013 12:20 PM by vincem120

    JavaScript CS4 vs CS6


      I have an old awesome HDR blending script that was written for Photoshop CS3-CS4 but will not run on CS6. Not being a programmer, I still would like to try and upgrade the script, but don't know where to start. Are there major differences in the JavaScript scripting between the two versions?

        • 1. Re: JavaScript CS4 vs CS6
          Michael L Hale Level 5

          Is there any error message? It could be something as simple as a poorly planned version check that didn't take future version in to account.


          For the most part, scripts written for older versions work fine in newer versions. The main differences in scripting between versions are new features of newer versions so normally a problem of a script not working in older versions. Execptions being dropped features and new scripting bugs.


          I think there were changes in HDR between CS4 and CS6 but it is hard to say, without seeing the script, why it will not run in CS6.

          • 2. Re: JavaScript CS4 vs CS6
            vincem120 Level 1

            Hi Michael,


            Thank you very much for your reply! The script does not actually use Photoshop's native HDR feature, but rather blends bracketed RAW images into a single RAW file with an extended tonal range, so I think I'm clear of that possibility.


            There is no error message, it actually crashes the program. I will try and verify the version check if any, just in case, but I fear it is more serious. Otherwise, knowing that there aren't that many changes and scripts are normally forward-compatible is encouraging. I'll look for a bug or a dropped feature, and hopefully get help from the toolkit.

            • 3. Re: JavaScript CS4 vs CS6
              Michael L Hale Level 5

              If you use ExtendScript Toolkit you can run the script one line at a time. That may give you a better idea of where the problem is.


              The dropped features I was thinking about would be things like the webGallery, picturePackage, and PDF that were dropped in CS4. Most scripting bugs throw error messages but don't crash Photoshop.


              Does it actually crash/close Photoshop or just causes Photoshop to stop responding?

              • 4. Re: JavaScript CS4 vs CS6
                vincem120 Level 1

                Yeah, it actually crashes it. First I get a window where I select the files to be processed, that works fine, and then when I hit Go and the script starts the heavy lifting, Photoshop just plain and simple crashes.


                I did try to run the script line by line before, but not being familiar with the toolkit, I was very methodical in my approach and gave up when I thought I had found two different places where sopmething went wrong (by removing the first glitchy line ;-). I'll give it another try.


                If you are curious about the script, I'm happy to send it over. I purchased it years ago from a guy named Tim Farrar, and it worked great. But he has since then stopped development and vanished...

                • 5. Re: JavaScript CS4 vs CS6
                  Michael L Hale Level 5

                  Deleting lines seldom fixes problems unless you replace that line with correct code that does the same thing because more often than not that line does something that the rest of the script depends on.


                  If you want to post the script or a link to where it can be downloaded I will be glad to have a look at it to see if I can spot the problem.

                  • 6. Re: JavaScript CS4 vs CS6
                    vincem120 Level 1

                    Yes, deleting lines is not a magic bullet, that's why I was smiling about it...


                    I'm a bit puzzled now; got back home yesterday and tried for 15 minutes to replicate my previous issue. Now the script just fails to run after the first user input, but I can't get it to crash PS again. Beginning to wonder if I previously had a fever. I did not have time to do a line by line execution.


                    Here is the script if you feel like playing with it: https://dl.dropboxusercontent.com/u/1179975/ffdd/FarrarFocus-Batch.jsx

                    • 7. Re: JavaScript CS4 vs CS6
                      vincem120 Level 1

                      I've now tried to run the script line by line and I'm afraid debugging this is beyond my ability. I get a combination of "internal error" and "undefined" and I don't even know how to get passed the first one. Stepping over trouble lines often does crash PS, but I guess that would be expected...

                      • 8. Re: JavaScript CS4 vs CS6
                        Michael L Hale Level 5

                        Sorry I haven't had much time to look at this. I think part of the problem may be the change in ACR from CS5 to CS6. From looking over the code I think it is using the 2010 ACR setting and CS6 uses the 2012 settings by default. So that setting mis-match may be one of the problems.


                        But I also can't get pass the line that sets a Photoshop preference and throw the 'internal error'. If I try setting that preference in a different script it works fine. For some reason it isn't in this script.


                        I will try to have another look later this week.

                        • 9. Re: JavaScript CS4 vs CS6
                          vincem120 Level 1

                          I did find a way around the interpolation error after some Googling. The bug was reported by others and after changing my PS settings to Bilinear by default, the error no longer happens. So then I go straight to ther crash.


                          I had not thought of the ACR changes as a cause, it's a good point. However I am pretty sure that the script already failed to work in CS5 long before the process was updated to 2012.


                          Don't lose sleep over it Michael, but I truly appreciate your help with this!

                          • 10. Re: JavaScript CS4 vs CS6
                            vincem120 Level 1

                            Well, I have officially given up on CS6 compatibility. After much trial and error, I found settings that will let me run the script on CS2. The key seems to be preparing the files (as initially explained when I got the script). They have to be DNG, with all settings neutral and Custom white balance, this being done in CS2's ACR, whichever version came with it... This is something I was not doing when running it on CS4 successfuly previously, but heck, it works.


                            I appreciate all the help, Michael!