Copy link to clipboard
Copied
Using the Notification/Notify (FA_Note_PostMouseCommand/FA_Note_PostMouseCommand), I can check where in the structure or which element was clicked and if a specific element was clicked, a dialog window opens to perform certain actions. But I would like to have that action occur only on a double click.
Any suggestions?
Thanks,
Trent Schwartz
This seems to work with FrameMaker 12:
...#target framemaker
setupNotifications ();
function setupNotifications () {
// Set notifications for after mouse command.
Notification(Constants.FA_Note_PreMouseCommand, true);
}
function Notify (note, object, sparam, iparam) {
// Handle the mouse events.
switch (note) {
case Constants.FA_Note_PreMouseCommand :
if (iparam === 16777269) {
alert ("double-click on element");
}
break;
}
Copy link to clipboard
Copied
Hi Trent,
What are you double-clicking on? An element? Thanks.
Rick
Copy link to clipboard
Copied
This seems to work with FrameMaker 12:
#target framemaker
setupNotifications ();
function setupNotifications () {
// Set notifications for after mouse command.
Notification(Constants.FA_Note_PreMouseCommand, true);
}
function Notify (note, object, sparam, iparam) {
// Handle the mouse events.
switch (note) {
case Constants.FA_Note_PreMouseCommand :
if (iparam === 16777269) {
alert ("double-click on element");
}
break;
}
}
Copy link to clipboard
Copied
Yes, double click on the element or at the element insertion point.
Thank you very much! That's what I was looking for, the iparam value returned 16777269 for double-clicking on the element and 16777267 for double-clicking in the insertion point. I would receive 51 or 53 for the first click, but the second click seemed like it was ignored. Likely culprit being the procedure that was called, and cleaned up after experimenting with control+click 131072 last night (which control+click is the same value anywhere in the structure view window).
Thanks again!
Trent Schwartz