Exit from the photoshop application using javascript or extendscript in Mac OS
Copy link to clipboard
Copied
Hi -- I have created a HTML5 panel extension in photoshop. I have a button and in click event I am trying to quit the photoshop application. I have tried the below code and it is working in windows os but not working in Mac. How can I quit the photoshop application in Mac. Thanks.
executeAction(app.charIDToTypeID('quit'), undefined, DialogModes.NO);
Explore related tutorials & articles
Copy link to clipboard
Copied
Try with this
ErrStrs = {}; ErrStrs.USER_CANCELLED=localize("$$$/ScriptingSupport/Error/UserCancelled=User cancelled the operation");
try {var idquit = charIDToTypeID( 'quit' ); executeAction( idquit, undefined, DialogModes.ALL ); }
catch(e){if (e.toString().indexOf(ErrStrs.USER_CANCELLED)!=-1) {;}
else{alert(localize("$$$/ScriptingSupport/Error/CommandNotAvailable=The command is currently not available"));}}
Copy link to clipboard
Copied
Hi -- I have tried the below code and It closes the Photoshop application but I still see that in Mac Dock (app open state). Any thoughts how to quit the application completely? Thanks.
var idquit = charIDToTypeID( 'quit' ); executeAction( idquit, undefined, DialogModes.ALL );
Copy link to clipboard
Copied
Use mac
And closes also in doc.

