5 Replies Latest reply on Jun 30, 2010 6:06 PM by Tom Ruark

    Droplet as a background/hidden task

    don9016

      I'm using Photoshop's Droplet feature to prepare images for OCR as well as crop and center the original images. It's one part of a larger script which automatically takes some .jpgs and the end result is the script uploads them (cropped) to a database along with data gathered from the OCR output. It's pretty much set it and forget it, except Photoshop gets opened and doesn't close when the macro/script/program finishes running. I could add code to kill Photoshop when everything's finished, but I'd really like to be not even have Photoshop load the GUI in the first place. Is it at all possible to just run Photoshop in the command line with no GUI ever getting loaded? It takes a few seconds to load Photoshop every time the script is run, and it interupts anything else I'm doing at the time. Having Photoshop already loaded and minimized when the script is run does not prevent PS from stealing focus.

       

      I don't think this is possible - I didn't find any solutions while searching Google (besides using ImageMagick instead of PS, which I may look into as I'm not doing anything particularly advanced in Photoshop - mostly levels manipulation and desaturation to produce black on white text) and I've never heard anything to suggest this is possible. Still I'm by no means an expert in Photoshop, so who knows.;)

        • 1. Re: Droplet as a background/hidden task
          xbytor2 Level 4

          Is it at all possible to just run Photoshop in the command line with no GUI ever getting loaded?

           

          No. The best you can do is run it with all of the panels hidden and then use the OS to 'hide' the application. This works out pretty well on the Mac, not quite so good on Win.

           

          Also, a one line script can be used to shutdown PS.

           

            executeAction(charIDToTypeID('quit'), new ActionDescriptor(), DialogModes.NO);
          
          • 2. Re: Droplet as a background/hidden task
            don9016 Level 1

            Thanks. I'm on Windows, but I'll try that out anyway.

             

             

            The code won't work since I'm not actually using Photoshop's scripting - I am using Java. I don't think PS scripting would allow 90% of what my script/program does. Thanks anyway.

            • 3. Re: Droplet as a background/hidden task
              xbytor2 Level 4
              The code won't work since I'm not actually using Photoshop's scripting -
               I am using Java

               

              If you want the droplet to shutdown PS before it's done, do an 'Insert Menu Item' and add 'File > Exit' as the last step in the action and resave the droplet. No need for JS.

              • 4. Re: Droplet as a background/hidden task
                Michael L Hale Level 5

                I don't know Java but if adding an exit step to your action isn't something you want to do I would think that you could still run the quit code at any point you like. You would have to convert what Xbytor posted from javascript to java but executeAction and charIDToTypeID are methods of the Photoshop application object. Unless you are not using the COM to drive Photoshop from java.

                • 5. Re: Droplet as a background/hidden task
                  Tom Ruark Adobe Employee

                  On windows I would control Photoshop via VBScript or any OLE Automation supported language and set the visible property

                  to false.

                   

                  app.visible = true