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);
Copy link to clipboard
Copied
Thanks!
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.
Download at you own risk http://www.mouseprints.net/old/dpr/ControlScriptListener.bat
Copy link to clipboard
Copied
Different topic but have you, by any chance, ever discussed assessing Smart Object properties via Scripts with Mr.Ruark?
Copy link to clipboard
Copied
No, I haven't discussed SO's with him.
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!
Copy link to clipboard
Copied
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.");
}