This event manager is not easy to deal with !
I need to link several events to a script by script.
For this command by hand, the script listener says :
var idAdobeScriptAutomationScripts = stringIDToTypeID( "AdobeScriptAutomation Scripts" );
var desc56 = new ActionDescriptor();
var idjsNm = charIDToTypeID( "jsNm" );
desc56.putString( idjsNm, "Gestionnaire d'événements de script..." );
var idjsMs = charIDToTypeID( "jsMs" );
desc56.putString( idjsMs, "1" );
executeAction( idAdobeScriptAutomationScripts, desc56, DialogModes.NO );
where the single parameter is "1".
It is the number assigned to the script file inside a .XML file in the "Adobe potoshop CS4 setting" folder in the user file space.
But where is the event parameter ? (it was "select" in this case)
In fact this command clandestinely links the event name and the file full path into the TW0001.DAT file inside th esame folder. Fine !
But modifying this file outside PS does not change the links into PS: so it is also recorded in memory.
How to synchronize this data by script ?
After many and many tests to guess how to program the event manager, I hope somebody knows this final answer.
Thank you for you help.
If you want the event to call one of several scripts depending on the arguments then after the argument is read you could have if or switch statements to eval the needed scripts.
Thank you Michael !
I am now so in the habit of getting a code from the scriptlistener because it is not available with objects that i completely forgot app.notifiers.
But in fact the scriptlistener is not helpfull to do what app.notifiers.add does, and it is a little bit strange. Nothing is perfect !
Sorry for my useless question.