0
Community Beginner
,
/t5/photoshop-ecosystem-discussions/script-to-enable-generator-in-photoshop/td-p/15007136
Nov 27, 2024
Nov 27, 2024
Copy link to clipboard
Copied
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!
TOPICS
Actions and scripting
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Community Expert
,
Nov 27, 2024
Nov 27, 2024
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) {
...
Explore related tutorials & articles
Community Expert
,
/t5/photoshop-ecosystem-discussions/script-to-enable-generator-in-photoshop/m-p/15007164#M841136
Nov 27, 2024
Nov 27, 2024
Copy link to clipboard
Copied
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.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Mia32565052d1g2
AUTHOR
Community Beginner
,
LATEST
/t5/photoshop-ecosystem-discussions/script-to-enable-generator-in-photoshop/m-p/15007248#M841144
Nov 27, 2024
Nov 27, 2024
Copy link to clipboard
Copied
Amazing! Thank you so much. Works perfectly.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
People's Champ
,
/t5/photoshop-ecosystem-discussions/script-to-enable-generator-in-photoshop/m-p/15007191#M841138
Nov 27, 2024
Nov 27, 2024
Copy link to clipboard
Copied
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

