FastScripts 3.3: Mouse Automation
February 27th, 2024FastScripts 3.3 is now available on the FastScripts home page, or by selecting “Check for Update” from the FastScripts menu.
This update includes a major new premium scripting addition, facilitating mouse automation by providing a variety of new scripting commands, including a powerhouse for synthesizing clicks and drags:
- click mouse simulates a mouse click at arbitrary point with params:
- at point
- [with button] left, right, middle, N
- [with click count] N
- [dragging to] point (optional – infers a drag after clicking)
- [with event cadence] N (imposes a delay between generated events)
Because synthesizing user events can easily conflict with inadvertent inputs from the actual user, FastScripts also supports a command to suppress user interaction while a script is running:
- disable user interaction
- [with timeout] N (optional: seconds before re-enabling)
- enable user interaction (optional: in any case, user interaction will be re-enabled when the script finishes)
When automating mouse events, the clicks, drags, and releases can happen so fast that it confuses or overwhelms some interface components. For this reason, FastScripts imposes a short delay between the generation and delivery of each individual event that makes up a requested automation command. I’m calling this delay the event cadence, and it can be overridden with a longer or shorter cadence by supplying a parameter to the click mouse command, or for the duration of a whole script by setting this property:
- default event cadence
Finally, there are two new properties for querying the state of the mouse and keyboard:
- current mouse position
- current keyboard modifiers
On top of these new automation features, there are a few bug fixes and enhancements. Here is the complete list of changes in this update:
Complete list of changes for this release:
- New Mouse Automation scripting additions for moving, clicking, and dragging the mouse
- Restore keyboard shortcuts for arrow navigation and deletion to search text field
- Fix a bug that could prevent the search field from being focused the first time the menu is displayed
- Fix a bug that prevented the “Open at login” checkbox from accurately reflecting the status
- Fix a possible crash when certain keystrokes are typed in the Keyboard Shortcuts preference pane
- Fix a bug that caused the FastScripts menu item to remain highlighted after navigating with arrow key
- Built-in crash reporter now detects crashes in script runner proceses
If you enjoy FastScripts, please consider spreading the word on Facebook or Twitter! Thanks for your support.