MSM-Workstation
Macros

Go back to the alphabetic list of macros
Go back to the first page of this tutorial

%%EvPtrButton

This macro generates code that returns a specification of the value of a property of the most recent event.

The property for which the value is returned by this macro is the name of the mouse button that caused the event to occur, which is equal to ^$Event("PBUTTON").

Possible values are:
PB1Left mouse button
PB2Middle mouse button
PB3Right mouse button

Examples

Assume that the code in the following examples occurs in the "action logic" for the event ptrUp

s button=%%EvPtrButton
Catch the relevant parameter of the event

i button="PB1" d xxx q
In case the left-button was pressed and released, do one thing...

i button="PB3" %%PopMenu(MenuForDemo) q
In case the right-button was pressed and released, pop up the menu for the current object.

See also

%%EvChoice, %%EvControl, %%EvElement, %%EvKey, %%EvNext, %%EvPrior, %%EvPtrPos, %%EvPtrState, %%EvSequence, %%EvType and %%EvWindow.