Copy link to clipboard
Copied
:light_bulb:Hello,
Using ExtendScript, I want to select a notifier (event listener) only when the active Photoshop document changes.
For example:
It should be triggered when switching to a different document (Ctrl+Tab or Window → Select Document) without closing the current document.
However, selection errors should not be triggered when the tool is changed or a new document is opened.
What I've tried so far:
:white_heavy_check_mark: Tried the "Opn" and "Cls" events, but these only work when the document is opened and closed.
:white_heavy_check_mark: "slct" activity is not suitable for intense effort.
:white_heavy_check_mark: I tried "Ntfy", "Dcmn", sometimes it works and sometimes it doesn't seem to work.
Is there a definitive method that only works on document exchange?
Code example:
javascript
copy
To organise
app.notifiersEnabled = true;
var notifierFile = new File($.fileName);
app.notifiers.add("Ntfy", notifierFile, "Dcmn"); // Should work on document exchange
:pushpin: I want to know if this method is reliable or if there is a better approach.
Thanks for your answers people! 🙌
I think you can add the event in »Script Events Manager.xml«:
Edit: The event should then be available in Script Events Manager.
Copy link to clipboard
Copied
I think you can add the event in »Script Events Manager.xml«:
Edit: The event should then be available in Script Events Manager.