Mouse
Overview
- The old format *Mouse command becomes Win.Mouse() with PowerPro's new expression syntax.
Syntax
Parameters
- mouse_codes
- (string) any combination of long-format or short-format codes, as a quote-delimited string
-
Possible Values
-
Modifier Keys
- Alt
- Reverses the Alt key (presses it if it's up, releases it if down).
- short form: al
- Ctrl
- Reverses the Control key (presses it if it's up, releases it if down).
- short form: ct
- Shift
- Reverses the Shift key (presses it if it's up, releases it if down).
- short form: sh
- Win
- Reverses the Windows key (presses it if it's up, releases it if down).
- short form: wi
-
Mouse Buttons
- LeftClick
- left click (both left down and left up)
- short form: lc
- LeftDown
- left down
- short form: ld
- LeftUp
- left up
- short form: lu
- LeftDouble
- double left click
- short form: ll
- Note: "lc lc" will not work.
- MiddleClick
- middle click (both middle down and middle up)
- short form: mc
- MiddleDown
- middle down
- short form: md
- MiddleUp
- middle up
- short form: mu
- MiddleDouble
- double middle click
- short form: mm
- Note: "mc mc" will not work.
- RightClick
- right click (both right down and right up)
- short form: rc
- RightDown
- right down
- short form: rd
- RightUp
- right up
- short form: ru
- RightDouble
- double right click
- short form: rr
- Note: "rc rc" will not work.
-
Mouse Position
- Move x y
- Moves the mouse x pixels right, & y pixels down.
- x & y can be negative.
- short form: mo x y
- Save
- Saves the current mouse position.
- short form: sa
- Screen x y
- Moves the mouse to a position (x,y) on the screen, where (0,0) is top left.
- short form: ab x y
- Relative x y
- Moves the mouse to a position x pixels to the right & y pixels below the top-left corner of the active window.
- short form: re x y
- Restore
- Restores a saved mouse position.
- If there is no saved position, the mouse is moved to screen (0,0).
- This mouse code has no short form.
Examples
- Win.Mouse("relative 50 100 leftclick")
- Moves the mouse to the position (50,100) relative to the active window, then left-clicks.
- This could also be written:
Win.Mouse("re 50 100 lc")
- Win.Mouse("sa mo 100 40 lc restore")
- Saves the current mouse position, then moves the mouse 100px right & 40px down before left-clicking, then restores the original mouse position.
- Win.Mouse("ct lc ct")
- Sends a Ctrl-Left-click to the active window.
See Also
-
PPSR > Plugins > The Plugins > Win > Services - Alpha-order [M-Z] > Mouse