Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Move the mouse cursor to a specified location
ResourceFunction["MoveMouse"][{x,y}] moves the mouse cursor to the screen coordinates (x,y). | |
ResourceFunction["MoveMouse"][All,{x,y}] is equivalent to ResourceFunction["MoveMouse"][{x,y}]. | |
ResourceFunction["MoveMouse"][notebook,{x,y}] moves the mouse cursor to the coordinates (x,y) using the position of notebook as the offset. | |
ResourceFunction["MoveMouse"][scope,{x,y},actions] performs actions after moving the cursor. |
| "Click" | click the left mouse button |
| "Wait" | wait one second |
| {"Type", string} | simulate typing the text given in string |
| {action1,action2,…} | a list of actions |
| {"Click",delay} | wait for delay seconds before clicking |
| {"Wait",delay} | wait for delay seconds |
| {"Type",delay,string} | pause for delay seconds between each keystroke |
| "Delay" | 1.0 | how long it takes for the cursor to reach its destination |
| "SelectNotebook" | True | whether or not to select the given notebook first |
Move the mouse to specific screen coordinates:
| In[1]:= |
| Out[2]= |
Move the mouse to relative coordinates in a notebook:
| In[3]:= | ![]() |
| Out[5]= |
| In[6]:= |
Move the mouse to a specified location and then click the left mouse button:
| In[7]:= | ![]() |
Move the mouse to a specified location, click and then type some text:
| In[8]:= |
Increase the delay between keystrokes:
| In[9]:= |
| In[10]:= |
By default, the mouse movement is smooth with one second of travel time. Set "Delay" to 0 to move instantly:
| In[11]:= |
Move the cursor smoothly over five seconds:
| In[12]:= |
Set "SelectNotebook" to False to prevent the given notebook from being selected:
| In[13]:= | ![]() |
| Out[9]= |
| In[14]:= |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License