Copy link to clipboard
Copied
Is there a way to open a photoshop document in some sort of "silent" mode, where the GUI doesn't actually launch? I am looking to open/edit/save changes to a .psd without the UI ever being launched. Using the adobe API & scripting I am able to accomlish all of the files changes I want, I would just prefer if all the work is done behind the scenes without the GUI ben launched. Any assitance would be appreciated!
Copy link to clipboard
Copied
I don't think that is posible however you may be able to minmize Photoshop while the script runs and see noothing. When your CPU useage drops the script is most likely done.
Copy link to clipboard
Copied
This is possible when using the COM API:
$ps = new COM("Photoshop.Application.".$version) or die ("Failed to initialize.");
$ps->Visible = false;
$ps->DisplayDialogs = 3;
But I never used it in production environment, so I can't say that it is as stable as Javascript.
Regards, markus
Copy link to clipboard
Copied
Your bang on the money markus.
It's works out well.
For anyone using this code though.
When you create the object "photoshop" it does fire off and you do see the logo.
Then after it loads it is then hidden.
vbcode:
Dim objApp
objApp = CreateObject("Photoshop.Application")
objApp.visible = false
Copy link to clipboard
Copied
Hi Markus-
Where's the best source of info on the COM API?
Thanks!
Copy link to clipboard
Copied
Aktually I do not now any documentation of Photoshops COM Interface. Years ago, I needed to communicate with ps through a PHP script and so I discovered that Photoshop exposes the same properties and methods as described in javascript guide or vb guide also to the COM Object.
All I needed was to push Javascript-Code from PHP to a version of Photoshop that ran hidden in the background.
something like that:
$version = 12;
$ps = new COM("Photoshop.Application.".$version) or die ("Failed to initialize.");
$ps->Visible = $visible;
$ps->DisplayDialogs = 3;
echo $ps->path; //echo a property
$ps->DoJavaScript("alert(123);"); //perform javascript
$ps->quit(); //perform a DOM function
This however is the only experience I have with photoshop's COM interface. I never needed to use it again later.
Regards,
markus
Copy link to clipboard
Copied
Where does this run from?
Copy link to clipboard
Copied
There is a reference to a "viewLessDocument" in CreateImageStack.jsx
See also the topic on PS-Scripts here.
Davide
www.davidebarranca.com
Find more inspiration, events, and resources on the new Adobe Community
Explore Now