Answered
Script to Enable Generator in Photoshop?
Hi,
I'm looking to automate enabling the generator in Photoshop through a script.
Does anyone have the code I could pinch?
Thanks so much!
Hi,
I'm looking to automate enabling the generator in Photoshop through a script.
Does anyone have the code I could pinch?
Thanks so much!
To toggle the checked menu on an open doc:
var idAdobeScriptAutomationspScripts = stringIDToTypeID("AdobeScriptAutomation Scripts");
var desc326 = new ActionDescriptor();
var idjavaScriptName = stringIDToTypeID("javaScriptName");
desc326.putString(idjavaScriptName, """Image Assets""");
executeAction(idAdobeScriptAutomationspScripts, desc326, DialogModes.NO);
app.beep();
Or:
AdobeScriptAutomationScripts("Image Assets");
app.beep();
function AdobeScriptAutomationScripts(javaScriptName) {
var s2t = function (s) {
return app.stringIDToTypeID(s);
};
var descriptor = new ActionDescriptor();
descriptor.putString(s2t("javaScriptName"), javaScriptName);
executeAction(s2t("AdobeScriptAutomation Scripts"), descriptor, DialogModes.NO);
}
Or:
$.evalFile(File(app.path + '/Presets/Scripts/generate.jsx'));
app.beep();
Feel free to remove the beep, it's just there to let you know that something happened, it could as well have been an alert.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.