14 Replies Latest reply on May 20, 2009 3:30 PM by Dave Saunders

    ID CS3 - Default scripts not working, no errors

    ebc1

      Trying to use default scripts "LabelGraphics.jsx" & "CropMarks.jsx"

      Have also tried to use the applescript equal in the scripts menu.

       

      In all cases nothing happens. No message, no script activity seen.

      Some of the other scripts such as "AddGuides.jsx" work just fine.

       

      Have copied working scripts from a different machine and get same result.

       

      What is keeping these scripts from working and any ideas on how to fix it?

       

      InDesign CS 3

      OS X 10.5.6

       

      Thanks

        • 1. Re: ID CS3 - Default scripts not working, no errors
          John.Kordas Level 1

          Are you running these in ID or from ExtendScript Toolkit?

           

          If you have just tried it from ID you might want to try running them from ESTK and see you get and error or message through there. To run the scripts in ESTK you can control click the script and select edit script then click the play button to run it. You may need to swap to ID to see the Dialog.

           

          Tried mine on PC worked fine. Just to be sure create a new doc place a pic in the center of the page then run LableGrpahic script. A dialog with 4 option should appear and once you run it  a label is placed at the bottom of the pic.

           

          Hope this helps.

          • 2. Re: ID CS3 - Default scripts not working, no errors
            Dave Saunders Level 4

            Your problem is that your InDesign has been set to "never interact" with users. In this state, when the sample script tries to put up a dialog it is immediately dismissed and the script is led to believe that the user clicked Cancel.

             

            To solve this problem add the following statement to each script on a line immediately before the line that includes the dialog show call -- just open the scripts in ESTK and use Find to locate the call to show.

             

            app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;

             

            Dave

            1 person found this helpful
            • 3. Re: ID CS3 - Default scripts not working, no errors
              [Jongware] Most Valuable Participant

              They do nothing, or they display a message and *then* do nothing?

               

              Both scripts you mention need you to have something selected.

              Labelgraphics requires you to have an (imported) image selected; it displays a dialog, asking what label to add, and then does so much.

              Cropmarks requires you to have any selection; it then displays a dialog, asking what kind of marks it should draw where around your selection.

               

              As both scripts display a clear warning when you have nothing selected, I'm guessing some other script suppressed all dialogs and did not restore this setting. (It's a usual trick to suppress ID's own warnings and confirmations, but it's considered polite to restore the setting afterwards.)

               

              Copy the next line into a blank plain text file, and save under the name "restoreDialogs.jsx" into the folder for scripts. You can find the correct folder to save in by Right- (or Context-) clicking on the User folder in the script palette and selecting "Reveal in Explorer/Finder". Run the script to restore dialog display, and test the scripts again.

               

              app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;

              • 4. Re: ID CS3 - Default scripts not working, no errors
                ebc1 Level 1

                These scripts would show no message and do nothing at all.

                 

                Creating and running the script with your code below did the trick:

                 

                app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;

                 

                Thanks for the help,

                John

                • 5. Re: ID CS3 - Default scripts not working, no errors
                  NTC Ann Level 1

                  I will try all these. I am not sure what this means.


                  use Find to locate the call to show.

                   

                  app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;

                  • 6. Re: ID CS3 - Default scripts not working, no errors
                    Olav Martin Kvern Level 3

                    Hi NTC Ann,

                     

                    It means: Use the ExtendScript Toolkit to look inside the example script. Find the line:

                     

                    var myResult = myDialog.show();

                     

                    And put the following line *before* that line:

                     

                    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;

                     

                    Then save the script.

                     

                    Alternatively, you can save that one line in a script and run it whenever you need to (i.e., when dialogs that should appear are not appearing).

                     

                    Thanks,

                     

                    Ole

                    • 8. Re: ID CS3 - Default scripts not working, no errors
                      NTC Ann Level 1

                      Oh dear. I am not doing very well at all in this. I did get notice to upgrade my Adobe applications and I think that is when this all started. Might someone have time to walk me through from the very beginning in how to do this. I do have the "Reset Window Position.jsx" script still on my desktop so that is at least one step done. I haven't been able to figure out where it is supposed to go. I don't know scripting and am not figuring out the right folders to put things in. I can try again tomorrow if someone can please help me walk thru this from the beginning. Thank you in advance for any help in this!

                      • 9. Re: ID CS3 - Default scripts not working, no errors
                        Olav Martin Kvern Level 3

                        Hi NTC Ann,

                         

                        In InDesign CS4, scripts go in the Scripts Panel folder, which is inside the Scripts folder in your InDesign application folder. When you put scripts there, they'll appear in the Scripts panel in InDesign (Window>Automation>Scripts). Then you can run them by double-clicking the script name in the Scripts panel.

                         

                        Thanks,

                         

                        Ole

                        • 10. Re: ID CS3 - Default scripts not working, no errors
                          NTC Ann Level 1

                          Hello again and thanks for your help. I found the place to put the script again and it shows up in InDesign. I double clicked on it in the windows under scripts. I then hit my control/W which was supposed to resize the window. Am I missing a step? Thanks again.

                          • 11. Re: ID CS3 - Default scripts not working, no errors
                            NTC Ann Level 1

                            (was supposed to resize the window to the area I set it up in that I wanted it in but nothing happened... it stayed the entire desktop and behind the palettes.)

                            • 12. Re: ID CS3 - Default scripts not working, no errors
                              Olav Martin Kvern Level 3

                              Hi NTC Ann,

                               

                              I really don't know anything about that script--it's not one of mine. Can you take a look inside the script with the ESTK and find out who wrote it? Or just copy the contents and post them here (assuming that it's not too long).

                               

                              Note, at the same time, that this script probably isn't suffering from the problem described earlier--if it doesn't display a dialog box, then it's not affected by the user interaction settings.

                               

                              Thanks,

                               

                              Ole

                              • 13. Re: ID CS3 - Default scripts not working, no errors
                                NTC Ann Level 1

                                Thank you everyone for your help. I called Adobe and he had me trash cache and preferences and it seems to be working now. Thanks all!!!

                                • 14. Re: ID CS3 - Default scripts not working, no errors
                                  Dave Saunders Level 4

                                  Ann,

                                   

                                  If you have trashed your preferences then you have lost your keyboard shortcuts. You need to visit Edit/Keyboard Shortcuts and activate your set that includes the Control-W shortcut attached to the resize window script.

                                   

                                  The script itself does not use a dialog (unless you run it with no document open, and even then it just throws up a confirm alert, which I think works no matter the interaction status).

                                   

                                  In CS4, the script does not work if you have the Application Frame active.

                                   

                                  The script's actions are driven by the contents of a text file that it creates the first time you run the script (ah, it throws up a confirm alert then, too).

                                   

                                  The file's name is WindowDefault6.txt. It contains something like this:

                                   

                                  0,1440,1200,3360

                                   

                                  That's from my machine. Hmm. Those are interesting numbers. Ah, those are the coordinates of my second monitor. Those are the coordinates to which the script sets your frontmost InDesign layout window.

                                   

                                  Dave

                                   

                                  PS: Ole, as you will no doubt have discerned, it's one of my scripts.