Hi Roman,
You can use a general script to capture the "number" of a function that doesn't have a specific Notification. Then you can use this number in an event script to capture that event and do what you need to.
#target framemaker
setupNotifications ();
function setupNotifications () {
Notification (Constants.FA_Note_PreFunction, true);
Notification (Constants.FA_Note_PostFunction, true);
}
function Notify (note, object, sparam, iparam) {
var element, regex;
// Handle the before/after function events.
switch (note) {
case Constants.FA_Note_PreFunction :
alert ("PreFunction: " + iparam);
break;
case Constants.FA_Note_PostFunction :
alert ("PostFunction: " + iparam);
break;
}
}
It looks like Save All Open Files is 796. So now you can do something like this:
#target framemaker
setupNotifications ();
function setupNotifications () {
Notification (Constants.FA_Note_PreFunction , true);
}
function Notify (note, object, sparam, iparam) {
// Handle the pre-function event.
switch (note) {
case Constants.FA_Note_PreFunction :
if (iparam === 796) {
// Do something before the Save All Open Files function.
}
break;
}
}