6 Replies Latest reply on Aug 3, 2016 12:39 AM by tssee@imgof.com

    JJMack help

    Level 1

      JJMack help

      When you use your template script

      sometimes I get this problem opens the preferences window

       

      Schermata 2016-08-01 alle 10.54.36.png

       

      to overcome this problem I disabled these two code strings

       

       

      / *

      preferences.rulerUnits = Units.PIXELS;

      preferences.typeUnits = TypeUnits.POINTS;

      * /

       

       

      Do you think I have trouble keeping them off

       

       

      according to you 'cause appears the preferences window?

       

       

      thanks again for all your help

        • 1. Re: JJMack help
          Kukurykus Adobe Community Professional

          Probably your code misses this line:

           

          displayDialogs = DialogModes.NO
          

           

          over those two you provided

          • 2. Re: JJMack help
            JJMack Most Valuable Participant

            tssee@imgof.com wrote:

             

            JJMack help

            When you use your template script

             

             

            to overcome this problem I disabled these two code strings

             

             

            / *

            preferences.rulerUnits = Units.PIXELS;

            preferences.typeUnits = TypeUnits.POINTS;

            * /

             

             

            What version of Photoshop are you using? 

             

            CC 2015 and CC 2015.5 have some scripting bugs.   I also did not write the CollageTemplateBuilder.jsx  Script I only modified Rag's script with his permission to create template PSD files compatible with my collage populating scripts.

             

            I also use Photoshop in Image Windows mode not in Tab mode.  If I try to use CollageTemplateBuilder using CC 2015 or CC 2015.5 the script dialog will flash on screen then Photoshop will hang and must be terminated with Windows Task Manager.  That script seems to work in CC 2015 when your preferences is set to open document in tabs.  I do not recommend using CC 2015 and CC 2015.5 has many issues. 

             

            Also I do NOT see the two script statements you show you commented out above in any script in my Photo Collage ToolKit package.  It would be very helpful if you could identify the script you modified.

            • 3. Re: JJMack help
              Level 1

              Kukurykus

              thanks for the reply

              just below the two lines that I turned off and present

               

               

              app.preferences.rulerUnits = Units.PIXELS;

              app.preferences.typeUnits = TypeUnits.PIXELS;

                 

              app.displayDialogs = DialogModes.NO;

              • 4. Re: JJMack help
                Level 1

                JJMack

                I use the script on mac mountanlion

                and photoshop cc2014

                the problem also occurs in photoshop cs6 and cc.

                 

                 

                and this under one of the script that creates the error

                TestCollageTemplate.jsx

                 

                 

                The problem is that the error does not always occur

                sometimes they do not.

                • 5. Re: JJMack help
                  JJMack Most Valuable Participant

                  We are still having a bit of a communication problem.  I that script the closest thing I see to the script statements

                  / *

                  preferences.rulerUnits = Units.PIXELS;

                  preferences.typeUnits = TypeUnits.POINTS;

                  * /

                  is:

                   

                  // Set Photoshop to use pixels and display no dialogs

                    app.preferences.rulerUnits = Units.PIXELS;

                    app.preferences.typeUnits = TypeUnits.PIXELS;

                    app.displayDialogs = DialogModes.NO;

                   

                  If you comment those statements out and your current Photoshop preferences for rulers and type are nor set to pixels the script will not function correctly.  No dialog should open it sometime dialog open it may help if you change the order of the statements to

                   

                  // Set Photoshop to use pixels and display no dialogs

                    app.displayDialogs = DialogModes.NO;

                    app.preferences.rulerUnits = Units.PIXELS;

                    app.preferences.typeUnits = TypeUnits.PIXELS;

                   

                  When a script set preference ruler units and type they are expecting to communicate to and from Photoshop in those unites and will be calculating sizes for images and font using those unites.   If the script is calculating using what it thinks are pixels units but Photoshop is using inches, percents, points etc there is a communication problem between the script and Photoshop. Things may well not work correctly.

                   

                  How many scripts did you change?

                   

                  The only script in the package that has the string "TypeUnits.POINTS" is  ChangeTextSize.jsx

                   

                  app.preferences.rulerUnits = Units.PIXELS;    // Set the ruler units to PIXELS

                  app.preferences.typeUnits = TypeUnits.POINTS; // Set Type units to POINTS

                  app.displayDialogs = DialogModes.NO;          // Set Dialogs off

                   

                  again changing the order may help

                   

                  app.displayDialogs = DialogModes.NO;          // Set Dialogs off

                  app.preferences.rulerUnits = Units.PIXELS;    // Set the ruler units to PIXELS

                  app.preferences.typeUnits = TypeUnits.POINTS; // Set Type units to POINTS

                   

                  I have edited all the script and move the no dialog statement up if case it may helps.  Most of the code was started in CS2  around the year 2005 the problem has not been reported before.  I use Windows but install the script on my son's mac they seemed to work I just had to add I thing file extensions like jpe for Jpeg file for that the extension my son's jpeg file had on his mac.   But I have not done any extensive testing on a Mac.   The Last Mac I had was a G5 with Mac OS7 and Mac OS9. Steve made a smart move to abandon Apple Mac on and move to Unix like he did in his NextStep company.

                  • 6. Re: JJMack help
                    Level 1

                    thanks for the reply

                    Now I see a little how I set it up for optimal operation.