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

Call Save As Dialog CC 2015

Contributor ,
Jul 14, 2015 Jul 14, 2015

Copy link to clipboard

Copied

I want to call the Save As menu command so it opens the Save As window

Screen Shot 2015-07-14 at 16.35.12.jpg

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

  };

TOPICS
Actions and scripting

Views

573

Translate

Translate

Report

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

correct answers 1 Correct answer

Enthusiast , Jul 14, 2015 Jul 14, 2015

saveAs();

function saveAs() {

try{

executeAction( charIDToTypeID('save'), undefined, DialogModes.ALL );

}catch(err){};

};

Votes

Translate

Translate
Adobe
Enthusiast ,
Jul 14, 2015 Jul 14, 2015

Copy link to clipboard

Copied

saveAs();

function saveAs() {

try{

executeAction( charIDToTypeID('save'), undefined, DialogModes.ALL );

}catch(err){};

};

Votes

Translate

Translate

Report

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
Contributor ,
Jul 14, 2015 Jul 14, 2015

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.

Votes

Translate

Translate

Report

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
Enthusiast ,
Jul 14, 2015 Jul 14, 2015

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

Votes

Translate

Translate

Report

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
Contributor ,
Jul 14, 2015 Jul 14, 2015

Copy link to clipboard

Copied

LATEST

Thank you Philip for your comment, now I understand where i went wrong

Votes

Translate

Translate

Report

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