Copy link to clipboard
Copied
I want to call the Save As menu command so it opens the Save As window
The Script Listener outputs the following but when executed in ExtendToolkit, I get an error saying this funcionality may not be available in this version of Photoshop on this line executeAction(cTID('save'), desc1, dialogMode);
Outputted code from Listener.
function SaveAs() {
// Save
function step1(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
desc1.putBoolean(cTID('Cpy '), true);
executeAction(cTID('save'), desc1, dialogMode);
};
saveAs();
function saveAs() {
try{
executeAction( charIDToTypeID('save'), undefined, DialogModes.ALL );
}catch(err){};
};
Copy link to clipboard
Copied
saveAs();
function saveAs() {
try{
executeAction( charIDToTypeID('save'), undefined, DialogModes.ALL );
}catch(err){};
};
Copy link to clipboard
Copied
That appears to do the trick Philip, thank you.
I am now trying to figure out how you arrived at this.
Copy link to clipboard
Copied
Using the scriptListener output will give you a better idea of what is going on. I see you have converted an Action to javaScript but missed useing the required functions
function cTID(s) { return app.charIDToTypeID(s); };
function sTID(s) { return app.stringIDToTypeID(s); };
this is why it didn't understand what cTID()
Copy link to clipboard
Copied
Thank you Philip for your comment, now I understand where i went wrong