Turning ScriptListener on and off

Adobe Community Professional ,
Jun 28, 2015 Jun 28, 2015

Copy link to clipboard

Copied

One the the things I hated about using ScriptListener was having to quit Photoshop, and either put the ScriptListener plugin in the plugins folder or change the name using the "~" to activate it. After complaining about this, Tom Ruark showed me two scripts that can turn the ScriptListener on and off from within PS - IMO greatest things since sliced bread! Just put the ScriptListener plugin in it's normal place and activated - without the "~" and put the two below scripts in the normal scripts folder.

ScriptListenerOn.jsx

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

ScriptListenerOff.jsx

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

TOPICS
Actions and scripting

Views

1.3K

Likes

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
Adobe Community Professional ,
Jun 28, 2015 Jun 28, 2015

Copy link to clipboard

Copied

Thanks!

Likes

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
LEGEND ,
Jun 28, 2015 Jun 28, 2015

Copy link to clipboard

Copied

I have the Scriptlistener plugin installed at all times on windows.  However I control when it can record on my windows machine with a small command file. This commd runs in a small windows in my desktop.  It allows me  to turn recording On and Off,  View and Extract what is recorded and Clear the log while I'm using Photoshop.

Capture.jpg

Download at you own risk http://www.mouseprints.net/old/dpr/ControlScriptListener.bat

JJMack

Likes

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
Adobe Community Professional ,
Jun 28, 2015 Jun 28, 2015

Copy link to clipboard

Copied

Different topic but have you, by any chance, ever discussed assessing Smart Object properties via Scripts with Mr.Ruark?

Likes

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
Adobe Community Professional ,
Jun 28, 2015 Jun 28, 2015

Copy link to clipboard

Copied

No, I haven't discussed SO's with him.

Likes

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
Explorer ,
May 21, 2018 May 21, 2018

Copy link to clipboard

Copied

Thank you, this was very helpful, the fact that I couldn't turn it off was driving me nuts, i saw a tinny lag when using it!

Likes

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 ,
Jun 12, 2022 Jun 12, 2022

Copy link to clipboard

Copied

LATEST

These scripts throw errors if the plugin is not installed, which can suck if you have one as an event script and are temporarily not using the plugin (to allow Tool Recording).

I suspect there's a best practice to check for their presence, but checking on ID works for me...

(example for turning OFF)

UPDATE: Does NOT work for me, or I get bugged by the "else" messages when I don't expect them. Maybe the ID that gets assigned will be different per session...

 

var listenerID = stringIDToTypeID("AdobeScriptListener ScriptListener");

if (listenerID==2896) {  // plugin is available ( If NOT, listenerID is 3438 )

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

} else {
    
    alert("It seems the ScriptListener plugin was not loaded anyway? Check your plugin folders."); 

}

 

 

 

 

Likes

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