Skip to main content
Inspiring
November 3, 2019
Answered

Select all (document) with event listener?

  • November 3, 2019
  • 1 reply
  • 923 views

Hello,

 

Is there an event to perform the Select All menu command (select all the active document) with CS6?

 

I used to use these scripts to switch on and off the event listener but there are no longer working, maybe since I updated to MacOS Sierra):

 

Switch ON:

// Copyright 2012.  Adobe Systems, Incorporated.  All rights reserved.
// The ScriptListener output can be turned on and off without having to uninstall.
// This one turns it on.

// enable double clicking from the Macintosh Finder or the Windows Explorer
#target photoshop

// in case we double clicked the file
app.bringToFront();

var listenerID = stringIDToTypeID("AdobeScriptListener ScriptListener");
var keyLogID = charIDToTypeID('Log ');
var d = new ActionDescriptor;
d.putBoolean(keyLogID, true);
executeAction(listenerID, d, DialogModes.NO);

alert("ScriptListener ON" + "\n" + "Un fichier .log des actions effectuées sera créé sur le bureau.");

 

Switch OFF:

// Copyright 2012.  Adobe Systems, Incorporated.  All rights reserved.
// The ScriptListener output can be turned on and off without having to uninstall.
// This one turns it off.

// enable double clicking from the Macintosh Finder or the Windows Explorer
#target photoshop

// in case we double clicked the file
app.bringToFront();

var listenerID = stringIDToTypeID("AdobeScriptListener ScriptListener");
var keyLogID = charIDToTypeID('Log ');
var d = new ActionDescriptor;
d.putBoolean(keyLogID, false);
executeAction(listenerID, d, DialogModes.NO);

alert("ScriptListener OFF" + "\n" + "Un fichier .log des actions effectuées a été créé sur le bureau.");

 

Thank you.

This topic has been closed for replies.
Correct answer Kukurykus

Examine below code and rewrite it to use via Script Events Menager:

 

 

sTT = stringIDToTypeID, dsc = new ActionDescriptor(), ref = new ActionReference()
ref.putProperty(sTT('channel'), sTT('selection')), dsc.putReference(sTT('null'), ref)
dsc.putEnumerated(sTT('to'), sTT('ordinal'), sTT('allEnum')), executeAction(sTT('set'), dsc)

 

 

 

1 reply

Kukurykus
KukurykusCorrect answer
Legend
November 3, 2019

Examine below code and rewrite it to use via Script Events Menager:

 

 

sTT = stringIDToTypeID, dsc = new ActionDescriptor(), ref = new ActionReference()
ref.putProperty(sTT('channel'), sTT('selection')), dsc.putReference(sTT('null'), ref)
dsc.putEnumerated(sTT('to'), sTT('ordinal'), sTT('allEnum')), executeAction(sTT('set'), dsc)

 

 

 

frmorelAuthor
Inspiring
November 3, 2019

Great 🙂

Thanks Kukurykus .