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

Starting “Free Transform” from a Photoshop jsx script

Guest
Mar 11, 2019 Mar 11, 2019

Hellow, how can i run "Free Transform" in Photoshop from jsx script. I used the received code from ScriptListener, but this code gives an error:

Error 8800: General Photoshop error occurred. This functionality may not be available in this version of Photoshop. - The command "" is not currently available. Line: 73 -> executeAction(idinvokeCommand, desc3666, DialogModes.NO );

This code:

// =======================================================

var idinvokeCommand = stringIDToTypeID( "invokeCommand" );

    var desc3666 = new ActionDescriptor();

    var idcommandID = stringIDToTypeID( "commandID" );

    desc3666.putInteger( idcommandID, 2207 );

    var idkcanDispatchWhileModal = stringIDToTypeID( "kcanDispatchWhileModal" );

    desc3666.putBoolean( idkcanDispatchWhileModal, true );

executeAction( idinvokeCommand, desc3666, DialogModes.NO );

// =======================================================

var idtoolModalStateChanged = stringIDToTypeID( "toolModalStateChanged" );

    var desc3667 = new ActionDescriptor();

    var idLvl = charIDToTypeID( "Lvl " );

    desc3667.putInteger( idLvl, 1 );

    var idStte = charIDToTypeID( "Stte" );

    var idStte = charIDToTypeID( "Stte" );

    var identer = stringIDToTypeID( "enter" );

    desc3667.putEnumerated( idStte, idStte, identer );

    var idTool = charIDToTypeID( "Tool" );

        var desc3668 = new ActionDescriptor();

        var idIdnt = charIDToTypeID( "Idnt" );

        desc3668.putString( idIdnt, """laso""" );

        var idTtl = charIDToTypeID( "Ttl " );

        desc3668.putString( idTtl, """Lasso Tool""" );

    var idTool = charIDToTypeID( "Tool" );

    desc3667.putObject( idTool, idTool, desc3668 );

    var idKnd = charIDToTypeID( "Knd " );

    var idKnd = charIDToTypeID( "Knd " );

    var idTool = charIDToTypeID( "Tool" );

    desc3667.putEnumerated( idKnd, idKnd, idTool );

    var idkcanDispatchWhileModal = stringIDToTypeID( "kcanDispatchWhileModal" );

    desc3667.putBoolean( idkcanDispatchWhileModal, true );

executeAction( idtoolModalStateChanged, desc3667, DialogModes.NO );

TOPICS
Actions and scripting
1.5K
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

correct answers 1 Correct answer

Community Expert , Mar 11, 2019 Mar 11, 2019

Juts turn on the dialog do not use "DialogModes.NO" or use menu item free transform.  The code you posted has nothing related to free transform. Its junk code you could have the Clean SL script remove from the javascript scriptlistener log.

var predefined = {

junkArray: [

"stringIDToTypeID( \"convertJSONdescriptor\" );",

"stringIDToTypeID( \"invokeCommand\" );",

"stringIDToTypeID( \"modalHTMLPending\" );",

"stringIDToTypeID( \"modalStateChanged\" );",

"stringIDToTypeID( \"toggleSearch\" );",

"stringIDTo

...
Translate
Adobe
Community Expert ,
Mar 11, 2019 Mar 11, 2019

Juts turn on the dialog do not use "DialogModes.NO" or use menu item free transform.  The code you posted has nothing related to free transform. Its junk code you could have the Clean SL script remove from the javascript scriptlistener log.

var predefined = {

junkArray: [

"stringIDToTypeID( \"convertJSONdescriptor\" );",

"stringIDToTypeID( \"invokeCommand\" );",

"stringIDToTypeID( \"modalHTMLPending\" );",

"stringIDToTypeID( \"modalStateChanged\" );",

"stringIDToTypeID( \"toggleSearch\" );",

"stringIDToTypeID( \"toolModalStateChanged\" );"

],

try{ InteractiveTransform();

}catch(e){alert("Image Transform Canceled");}

//==================== Interactive Transform ==============

cTID = function(s) { return app.charIDToTypeID(s); };

sTID = function(s) { return app.stringIDToTypeID(s); };

function InteractiveTransform() {

  // Menu Edit>Free transform

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Mn  '), cTID('MnIt'), cTID('FrTr'));

    desc1.putReference(cTID('null'), ref1);

    executeAction(cTID('slct'), desc1, DialogModes.NO);

};

JJMack
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
Guest
Mar 11, 2019 Mar 11, 2019
LATEST

Great! Thank you for help!

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