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
action:Move_or_Click_Mouse [2017/05/27 20:28]
JMichaelTX
action:Move_or_Click_Mouse [2023/09/15 02:20] (current)
peternlewis [Setup of Found Image]
Line 9: Line 9:
  
  
-**Simple Example: Click Mouse at Location Relative to Window**\\+Simple Example: Click Mouse at Location Relative to Window 
 {{:​action:​moveorclickmouse.png?​511|}} {{:​action:​moveorclickmouse.png?​511|}}
  
Line 16: Line 17:
 As you select options further settings may become available. For example, if you //click// then you can also choose a button to click with and whether or not to also press a modifier key such as Control. As you select options further settings may become available. For example, if you //click// then you can also choose a button to click with and whether or not to also press a modifier key such as Control.
  
 +{{:​action:​move-click-mouse-action-setup-km-7.3.png?​nolink|}}
  
- +==== Mouse Operation ====
-Select:+
   *Just Move.   *Just Move.
   *Click.   *Click.
Line 25: Line 26:
   *Release.   *Release.
  
-Select from the pop-up a mouse button ​to click or release.+ 
 +==== Mouse Button ==== 
 + 
 +  * left button ​(default) 
 +  * right button 
 +  * center button 
 +  * button 4 
 +  * button 5 
 +  * button 6 
 + 
 +==== Modifier Keys ====
  
 Select zero or more modifier keys by clicking the relevant icon: Select zero or more modifier keys by clicking the relevant icon:
Line 33: Line 44:
   *Command — ⌘.   *Command — ⌘.
  
-When a modifier key is clicked ​the icon is filled with blue.+When a modifier key is included ​the icon is filled with blue.
  
-If relevant, specify coordinates by entering a number ​or using the stepper arrows.+==== X & Y Locations for Mouse Action ==== 
 +  * Enter Coordinates in pixels 
 +  * Location may be absolute ​or relative, based on next setting.
  
-** Coordinates are in pixels. ** +==== Location Relative To ====
- +
-Clicking or moving may be relative to a:+
   *mouse location.   *mouse location.
   *absolute position.   *absolute position.
Line 49: Line 60:
   *found image'​s center.   *found image'​s center.
  
-Note: the //Go// button moves the mouse to the specified location. The //​Get// ​button ​counts down from 5 so you have time to move the mouse pointer then gets the pointer’s coordinates.+**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.
  
-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 clickIf 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.+==== 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. 
 +  * //Go// button moves the mouse to the specified X & Y location. 
 +  * //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. 
 + 
 +==== Mouse Drag Options ====
  
 Specify from the pop-up whether the click operation is: Specify from the pop-up whether the click operation is:
Line 60: Line 78:
   *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//.
  
-Note: use the gear icon at top right of the action to select whether or not to //Restore Mouse Location//.+===== Click at Found Image =====
  
-===== See Also =====+You can also click relative to a [[:Found Image|Found Image]]. ​ By default 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. Alternatively,​ you can specify which image to click (Best, Topmost, Leftmost, Bottommost or Rightmost). You can also use the [[action:​Find_Image_on_Screen|Find Image on Screen]] action 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.
  
-----+{{page>::​Found_Image#​How To Use&​noheader&​nofooter}} 
 + 
 +If the click offsets are all fixed values (not calculations),​ you can select the image well and press <​key>​SPACE</​key>​ to show the image with the location of the click displayed on the image (v11.0+). 
 + 
 +There is an option in the action (gear) ⚙ menu to have the action wait until the image appears (v11.0+). 
 +===== See Also =====
  
-=== Actions ===+==== Actions ​====
  
 * [[action:​Bring Application Windows to Front]] * [[action:​Bring Application Windows to Front]]
Line 78: Line 103:
 * [[:​Actions|See all Actions]] * [[:​Actions|See all Actions]]
  
-===  Collections ===+====  Collections ​====
  
 * [[collection:​Found Images|Found Images]] * [[collection:​Found Images|Found Images]]
 * [[:​Collections|See all Collections]] * [[:​Collections|See all Collections]]
  
-===  Conditions ===+====  Conditions ​====
  
 * [[condition:​Found Image|Found Image]] * [[condition:​Found Image|Found Image]]
 * [[:​Conditions|See all Conditions]] * [[:​Conditions|See all Conditions]]
  
-=== Functions ===+==== Functions ​====
  
 * [[function:​MENUBARHEIGHT|MENUBARHEIGHT()]] * [[function:​MENUBARHEIGHT|MENUBARHEIGHT()]]
Line 101: Line 126:
 * [[:​Functions|See all Functions]] * [[:​Functions|See all Functions]]
  
-=== Tokens ===+==== Tokens ​====
  
 * [[token:​CurrentMouse|%CurrentMouse%]] * [[token:​CurrentMouse|%CurrentMouse%]]
Line 113: Line 138:
 * [[token:​WindowSize|%WindowSize%]] * [[token:​WindowSize|%WindowSize%]]
 * [[:​Tokens|See all Tokens]] * [[:​Tokens|See all Tokens]]
- 
----- 
  
 ==== Forum ==== ==== Forum ====
  
 - [[https://​forum.keyboardmaestro.com/​t/​macro-move-window-1-space-left-right-or-to-different-desktop/​3100/​2|MACRO:​ Move Window 1 Space Left/Right or to Different Desktop]] - [[https://​forum.keyboardmaestro.com/​t/​macro-move-window-1-space-left-right-or-to-different-desktop/​3100/​2|MACRO:​ Move Window 1 Space Left/Right or to Different Desktop]]
action/Move_or_Click_Mouse.1495931306.txt.gz · Last modified: 2017/05/27 20:28 by JMichaelTX