Mouseposé extensively supports AppleScript. This allows you to control Mouseposé through other means than adjusting it manually or hitting a hotkey. Common examples are via Speech Control or third party applications, e.g. Salling Clicker.
Supported Commands and Properties
In addition to some standard AppleScript suites the Mouseposé suite supports the following commands and properties of the Mouseposé application object:
Application Properties
Mouseposé effect
- uses timeout (boolean) : flag whether the effect stops automatically or not.
- effect timeout (real) : time before the effect stops automatically (in seconds). Only used if uses timeout is set.
- effect blur (real) : amount of softening of the circle's border (in percent).
- effect size (real) : size of the effect surrounding the mouse pointer (in pixels).
- overlay color (color) : background color around the Mousepose effect, RGB values (0 to 65535) in format {r,g,b]. The alpha value has to be set with background opacity property.
- overlay opacity (real) : transparency around the effect. Percentage from 0 (effect completely invisible) to 100 (screen around effect is completely filled with effect color).
- animates start and stop (boolean) : flag whether starting and stopping of the Mouseposé effect should be animated.
- start and stop animation duration (real) : duration of the start and stop animation.
- window focus (boolean) : flag whether the effect should focus on a window on mouse inactivity.
- mouse inactivity interval (real) : time interval mouse has to stand still until window focus starts.
Mouse click
- mouse click radius (real) : size of the disk drawn on mouse click.
- fade out mouse click (boolean) : flag whether the mouse clicks should be faded out or not.
- click color (color) : color for visualizing left mouse clicks in RBG format {r,g,b}.
- click opacity (real) : transparency for visualizing left mouse clicks. Percentage from 0 (click visualisation is completely invisible) to 100 (click visualisation is completely filled with click color).
- right click color (color) : color for visualizing right mouse clicks in RBG format {r,g,b}.
- right click opacity (real) : transparency for visualizing right mouse clicks. Percentage from 0 (click visualisation is completely invisible) to 100 (click visualisation is completely filled with click color).
- other click color (color) : color for visualizing all other mouse clicks in RBG format {r,g,b}.
- other click opacity (real) : transparency for visualizing other mouse clicks. Percentage from 0 (click visualisation is completely invisible) to 100 (click visualisation is completely filled with click color).
- play click sound (boolean) : flag whether mouse clicks should give audio feedback.
- click sound volume (real) : volume of mouse clicks audio feedback.
Keystroke display
- keystroke color (color) : overlay color of the keystroke display, RGB values (0 to 65535) in format {r,g,b}. The alpha value has to be set with keystroke opacity property.
- keystroke opacity (real) : transparency of keystroke display. Percentage from 0 (effect completely invisible) to 100 (keystroke display is completely filled with keystroke display overlay color).
- keystroke toggling notification (bool) : flag whether to display a brief notification when the keystroke display is switched on or off.
- visualize keystrokes only with modifiers (integer) : flag whether to display all keystrokes, only those with a modifier pressed or only complete key combination of key and modifier.
- keystroke fade delay (real) : the delay (in seconds) after the last keystroke before the keystroke display fades out.
Other
mouse location (list) : position of the mouse in global Cocoa coordinates. The origin is the bottom left corner of the main screen.
Colors have to be written as lists containing three numbers, each of which has a value between 0 and 65535. These numbers represent the color channels red, green and blue (in that order). Example: { 25000, 888, 65000 }, where the first number represents the amount of red, the second the amount of green and the last how much blue is being added.
Commands
Mouseposé effect
- start effect: Activate the Mouseposé effect.
- stop effect: Deactivate the Mouseposé effect.
Mouse click visualization
- start mouse click visualization: Activate drawing of mouse clicks.
- stop mouse click visualization: Deactivate drawing of mouse clicks.
Mouse clicks
(Mouse clicks can be sent to any application - Mac OS X Leopard (10.5.x) and up only)
- perform single left click: Performs a single click with left mouse button at the current mouse position.
- perform double left click: Performs a double click with left mouse button at the current mouse position.
- perform single right click: Performs a single click with right mouse button at the current mouse position.
- perform double right click: Performs a double click with right mouse button at the current mouse position.
- perform single other click: Performs a single click with the middle mouse button at the current mouse position.
- perform double other click: Performs a double click with the middle mouse button at the current mouse position.
Keystroke display
- start keystroke display: Activate the keystroke display.
- optional: notification (boolean) : whether to show the toggle notification
- stop keystroke display: Deactivate the keystroke display.
- optional: notification (boolean) : whether to show the toggle notification
- display keystrokes: Display an arbitrary string in the keystroke display.
- (text) : text to display
- optional: fading out after (real) : time after the display fades out
You need to start the display before display keystrokes works.
start keystroke display without notification
display keystrokes "test" fading out after 2.0
Please also do not switch off the display until the display should fade out, probably by using
delay 2.0
stop keystroke display without notification
Open this snippet in Script Editor
Other
- store settings: Save all current settings for later restoring.
- restore settings: Restore last saved settings.
Sample Script
You can copy and paste below text in the Script Editor application in order to test and modify this script on your own. Or more conveniently: Click the link below the sample text to have it open in Script Editor.
--this script will modify some of the default settings and run the basic commands
tell application "Mousepose"
store settings
set overlay color to {65535, 20000, 20000}
set overlay opacity to 40
set animates start and stop to true
start effect
delay 1
set overlay opacity to 70
delay 1
set mouse location to {500, 500}
set overlay opacity to 30
delay 1
set animates start and stop to false
stop effect
restore settings
end tell
Open this in Script Editor