I can run a script when a new doc is created, or when doc is duplicated, etc.
But I need that whenever the active image changes >> run my script
is there an activeDocument event?
-
Mike Hale
is there an activeDocument event?
If I understand what you are asking you will need three notifiers. One for make( new doc ), one for dupe, and one for select. For each of those you will also need to check the class for the event so your script only runs when the event is doc related.
-
pedromarques
is there an activeDocument event?
I have all but I am missing only 1 notifier: selection
I didn't realize that selection 'slct' was what I needed.
It works only when I select other image then the active one.
But... (there is allways a but)
When when the active image closes, the active image will be another one, and the event does not run.
It seams only to detect the user document selection and not the change of active document.
To solve this, if I use the close event, it does not run when I close an image by script (only by user).
Anyway, it was a nice help. Thanks Mike
///////////////// Notifier
if (BridgeTalk.appName == "photoshop"){
app.notifiersEnabled = true;
var cstoolEvent = new File(myscript.jsx");
try{
app.notifiers.add('slct', cstoolEvent);
}catch(e){}
}
I didn't realize that selection 'slct' was what I needed.
It works only when I select other image then the active one.
But... (there is allways a but)
When when the active image closes, the active image will be another one, and the event does not run.
It seams only to detect the user document selection and not the change of active document.
To solve this, if I use the close event, it does not run when I close an image by script (only by user).
Anyway, it was a nice help. Thanks Mike
///////////////// Notifier
if (BridgeTalk.appName == "photoshop"){
app.notifiersEnabled = true;
var cstoolEvent = new File(myscript.jsx");
try{
app.notifiers.add('slct', cstoolEvent);
}catch(e){}
}