User Tools

Site Tools


action:Move_or_Click_Mouse

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
action:Move_or_Click_Mouse [2017/05/27 21:09]
JMichaelTX Add screenshots and sections
action:Move_or_Click_Mouse [2017/06/03 17:01]
JMichaelTX [Setup and Testing]
Line 59: Line 59:
   *found image'​s center.   *found image'​s center.
  
 +**To get the relative distance** (offset) of the Mouse position relative to some location, like the window top, left corner, use the _Get_ button _after_ you have set the _relative to_ location.
 ==== Setup and Testing ==== ==== Setup and Testing ====
 The //Go// and //Get// Buttons are used only during setup of the Action. ​ They have no effect when the macro is executed. The //Go// and //Get// Buttons are used only during setup of the Action. ​ They have no effect when the macro is executed.
   * //Go// button moves the mouse to the specified X & Y location.   * //Go// button moves the mouse to the specified X & Y location.
-  * //Get// button sets the X & Y location to current mouse position, after a countdown from 5 to allow time to move the mouse pointer.+  * //Get// button sets the X & Y location to current mouse position 
 +    * Relative to the location set by the //relative to// popup 
 +    * Gives you a countdown from 5 to allow time to move the mouse pointer.
  
-You can also click relative to a [[:Found Image|Found Image]]. ​ The image **has to be unique** (which includes not being visible in the action if the image is small enough not to be shrunk in the image well) otherwise Keyboard Maestro will not know where to click. If the image is not unique and you want to click on one of them, you can either use the [[action:​Find_Image_on_Screen|Find Image on Screen]] action (which has an option to find a non-unique image) or the [[action:​For_Each|For Each]] action with the [[collection:​Found_Images|Found Images]] collection to find all matching images and click on them as appropriate.+==== Mouse Drag Options ====
  
 Specify from the pop-up whether the click operation is: Specify from the pop-up whether the click operation is:
Line 73: Line 76:
   *and hold.   *and hold.
  
-Note: buttons that are pressed stay pressed only as long as the macro continues to run.+Notes 
 +  - buttons that are pressed stay pressed only as long as the macro continues to run. 
 +  - use the gear icon at top right of the action to select whether or not to //Restore Mouse Location//​. 
 + 
 + 
 +==== Setup of Found Image ==== 
 + 
 + 
 +You can also click relative to a [[:Found Image|Found Image]]. ​ The image **has to be unique** (which includes not being visible in the action if the image is small enough not to be shrunk in the image well) otherwise Keyboard Maestro will not know where to click. If the image is not unique and you want to click on one of them, you can either use the [[action:​Find_Image_on_Screen|Find Image on Screen]] action (which has an option to find a non-unique image) or the [[action:​For_Each|For Each]] action with the [[collection:​Found_Images|Found Images]] collection to find all matching images and click on them as appropriate. 
 + 
 + 
 +**Example: Click on Image in Area Relative to Front Window**\\ 
 +{{:​click-found-image-action-km-7.3.png?​nolink|}} 
  
-Note: use the gear icon at top right of the action to select whether or not to //Restore Mouse Location//. 
  
 ===== See Also ===== ===== See Also =====
action/Move_or_Click_Mouse.txt · Last modified: 2023/09/15 02:20 by peternlewis