Macro Language Reference > Macros > Mouse > tclick
  
tclick
Description
Allows customization of mouse clicks. This macro was written to give users the option to apply any macro they wish to a mouse click.
Syntax
tclick n1:n n2:n? ^mx/n3:n? ^my/n4:n?
n1
The PTC ALD operating mode:
1
Document
2
Page
3
Text
4
Graphics
5
Add frame
n2
The mouse action to be customized:
1
Normal click
2
Click with Shift key down
-1
Click with Alt key down
^mx/n3
x co-ordinate of mouse (optional): select one of 3 options:
Set to the PTC ALD variable name: the value is picked up internally as the actual x position in the work area is clicked.
Specify the value explicitly: the mouse will always go to that position. This method is useful in scripting.
Leave blank: the value is picked up internally (as in option 1) but later on in the code - it is not certain, therefore, that the cursor will move to the desired position.
^my/n4
y co-ordinate of mouse (optional): select one of 3 options:
Set to the PTC ALD variable name: the value is picked up internally as the actual x position in the work area is clicked.
Specify the value explicitly: the mouse will always go to that position. This method is useful in scripting.
Leave blank: the value is picked up internally (as in option 1) but later on in the code - it is not certain, therefore, that the cursor will move to the desired position.
Additional Information
In previous versions of PTC ALD left mouse clicks were hard coded whereas right clicks invoked macros. Now every mouse click calls a macro from the scontext.3ad file.
Normally a double click on a mouse would follow the single click, i.e. single left click to insert cursor; double click to select word at insert cursor position. To overcome this limitation a delay pseudo click has been added, which is sent out if the double click time elapses before another click is received. Thus the user can assign macros to the delay codes only, which means that the assigned macros don't have to tie into each other. However, if a macro invokes, for example, a dialog box, subsequent clicks will be ignored. A triple click was also a limitation in previous versions: now the user can enter up to 9 clicks.