Answered
Evnet for select active project
💡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:
✅ Tried the "Opn" and "Cls" events, but these only work when the document is opened and closed.
✅ "slct" activity is not suitable for intense effort.
✅ 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
📌 I want to know if this method is reliable or if there is a better approach.
Thanks for your answers people! 🙌

