12 Replies Latest reply on Nov 19, 2012 2:37 PM by Nlwest

    Scripts not working in CS5

    hummbled

      PC Vista CS5 V7.0.3

      This week we installed CS5, leaving CS3 so both versions are available.

      After this install, scripts did not work in CS3, but we edited them so they now work again in CS3.

      Scripts do not work in CS5. If we select a script in the scripts panel, right click to Reveal in Explorer, we can double click that and the script will work. Obviously this is not an acceptable workaround, not just because it's cumbersome and it should work from the panel within the program, but also keyboard shortcuts assigned to a script can't be used.

      The programs are not installed locally on the hard drive, they are on a server.

      Has anyone experienced scripts not working in CS5, or know why this may be happening?

       

      Thanks!

        • 1. Re: Scripts not working in CS5
          Kees van Daalen

          Are there any target directives in the script?

          Like

           

          #target "indesign5" ?

          • 2. Re: Scripts not working in CS5
            hummbled Level 1

            That was what we did to get scripts to work again in CS3, we added it after Application: ("InDesign.Application.CS3")

            Adding CS5 there did not help with version 7.

            What we wound up doing was moving scripts from the server Version 7.0 folder, which scripts appear in ID under the User folder in the scripts panel, to our hard drive Version 7.0 folder, so now scripts appear under the Application folder in the scripts panel, and they are working okay.

            But I would still like to know why Javascripts work in the User location but not VB scripts?

            Also, why do all scripts in the Version 5.0 on the server for CS3 still work?

            At this point, we're just glad to be using our daily scripts again.

             

            Thank you!

            • 3. Re: Scripts not working in CS5
              FlemmingP

              I have the same problem.

              Running Windows 7

               

              Our scripts in VisualScript runs under CS4, But not under CS5.

              JavaScripts work under both versions.

               

              However, if I run the script (below) outside InDesign CS5 it fires (not all the code though, but still)

               

              FlemmingP

               

               

              error.png

              • 4. Re: Scripts not working in CS5
                hummbled Level 1

                Thank you for sharing this, apparently it is a CS5 issue. Ultimately we want the scripts to work, and use shortcuts to run them, but they should work in either the Application or User locations, like JavaScript does, without having to run it outside the program.

                 

                Maybe this is a bug that should be reported to be fixed?

                • 5. Re: Scripts not working in CS5
                  Harbs. Level 6

                  Can you try running the script from Script Bay?  Do they work from there?


                  Harbs

                  • 6. Re: Scripts not working in CS5
                    Olav Martin Kvern Level 3

                    Fellow Scripters,

                     

                    I've run into this on one Windows 7 machine, but not on other machines running either Windows 7 or Windows XP. It's VBScript-only; no problem running JavaScripts. It's almost certainly some sort of security/permissions problem, but I've had no luck tracking it down so far. It may even have to do with the permissions for the user that installed the application.

                     

                    You can probably work around it by having a JavaScript use app.doScript to run the VBScript file. It's inelegant, but it will work, and will avoid the problems that come up when VBScripts are run from outside the Scripts panel (enumerations fail, and need to be converted to their decimal values).

                     

                    Thanks,

                     

                    Ole

                    • 7. Re: Scripts not working in CS5
                      FlemmingP Level 1

                      I can only download a zip file, no zxp file present

                      • 8. Re: Scripts not working in CS5
                        FlemmingP Level 1

                        Our IT java guy said the exaclty same thing, but there might be a problem

                        using the FileSystemObject

                        • 9. Re: Scripts not working in CS5
                          Harbs. Level 6

                          Your browser (probably Internet Explorer) might be adding the zip extension. Try removing the zip extension or downloading with FireFox or Chrome...

                           

                          Harbs

                          • 10. Re: Scripts not working in CS5
                            Olav Martin Kvern Level 3

                            Fellow Scripters,

                             

                            Well, that was easy.:-) I'm not sure why I didn't think of it earlier, but this fixed the problem on my Windows 7 laptop:

                             

                            1. Open your InDesign application folder and select InDesign.exe.

                             

                            2. Select Properties from the context menu.

                             

                            3. Turn on the Run This Program As An Administrator option in Compatibility tab.

                             

                            4. Click OK to close the Properties panel.

                             

                            Now all of my VBScripts run from the Scripts panel. (I don't know if this will have any effect on the file system object problem reported above--I haven't had any trouble using the file system object.)

                             

                            Hope this helps!

                             

                            Thanks,

                             

                            Ole

                            • 11. Re: Scripts not working in CS5
                              FlemmingP Level 1

                              Funny

                              I did the same this morning and it works. Also the FileSystemObject.

                               

                              Thanks

                               

                              FlemmingP

                              • 12. Re: Scripts not working in CS5
                                Nlwest User Group Manager

                                We were not able to use the solution of Run this Program as an Administrator, because when you run a program as an adminstrator, you lose the mapped drives on the workstation. We use the mapped drives extensively on our network for our workgroup. For example, drive S:\ is our regular drive for production that goes to the dfs PROD, so we remap S:\ to PROD.NEW when we are testing, and all of our scripts reference the mapped drive letter, so we can use them for testing purposes.

                                 

                                What our IT administrator found was the BEST solution for us as multiple users on a network was to add Modify rights to the user accounts. He logged into the machine as administrator, and did the following:

                                 

                                1. Open your InDesign application folder and select InDesign.exe.
                                2. Select Properties from the context menu.
                                3. Go to the SECURITY tab
                                4. Under the "Group or user names:" section, select USERS
                                5. To change permissions, click the EDIT button
                                6. Under the "Permissions for Users", in the row “Modify,” in the column "Allow" check YES to allow users to modify
                                7. Click OK

                                 

                                This will do the same thing as the above suggestion (run VBScripts under Windows 7)  AND keep the mapped network drives visible for those who use them.