Skip to main content
Participant
December 1, 2017
Answered

Show/Hide Selection Edges

  • December 1, 2017
  • 2 replies
  • 3053 views

Hi

I'm new in Adobe scripting. I hope i can find some help here

I need a snippet can show/hide current layer selection ( not deselect ) which command trigger in "View> Show> Selection Edges" menu

I dont see it record in history or log . Is there any way to access it or trigger shortcut via javascript code ?

Thanks

Dzung

This topic has been closed for replies.
Correct answer r-bin

Read here Create actions in Adobe Photoshop how to Insert a non-recordable menu command.

In a script, you can use this code

app.runMenuItem(stringIDToTypeID("toggleEdges"))

or

var r = new ActionReference();

r.putEnumerated(charIDToTypeID("Mn  "), charIDToTypeID("MnIt"), charIDToTypeID("TglE"));

var d  = new ActionDescriptor();

d.putReference(charIDToTypeID("null"), r);

executeAction( charIDToTypeID( "slct" ), d, DialogModes.NO );

2 replies

Participant
December 1, 2017

Wow ! Thank you for your help

r-binCorrect answer
Legend
December 1, 2017

Read here Create actions in Adobe Photoshop how to Insert a non-recordable menu command.

In a script, you can use this code

app.runMenuItem(stringIDToTypeID("toggleEdges"))

or

var r = new ActionReference();

r.putEnumerated(charIDToTypeID("Mn  "), charIDToTypeID("MnIt"), charIDToTypeID("TglE"));

var d  = new ActionDescriptor();

d.putReference(charIDToTypeID("null"), r);

executeAction( charIDToTypeID( "slct" ), d, DialogModes.NO );