Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Exit from the photoshop application using javascript or extendscript in Mac OS

Community Beginner ,
Jul 04, 2017 Jul 04, 2017

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);

TOPICS
Actions and scripting
759
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Advocate ,
Jul 04, 2017 Jul 04, 2017

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"));}}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 04, 2017 Jul 04, 2017

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 );

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 04, 2017 Jul 04, 2017
LATEST

Use mac

And closes also in doc.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines