Puedes usar Automator / Apple Script para esto con la aplicación de línea de comandos Mouse Tools .
Puede obtener Mouse Tools en aquí . Es una pequeña herramienta para mover el puntero del mouse y realizar clics.
[-h] return this help text
[-b] coordinates are measured from bottom-left corner of the screen
[-location] return the current mouse location
[-x "xValue" -y "yValue"] move the mouse to the {xValue, yValue} location
[-mouseSteps numSteps] move mouse in number-of-steps to the location
[-leftClick] perform a mouse left-click at the current mouse location
[-doubleLeftClick] perform a mouse double-click with the left mouse button
[-rightClick] perform a mouse right-click at the current mouse location
[-shiftKey] shift key down, useful when performing a left-click event
[-commandKey] command key down, useful when performing a left-click event
[-optionKey] option key down, useful when performing a left-click event
[-controlKey] control key down, useful when performing a left-click event
[-leftClickNoRelease] perform a mouse click and do not release the mouse click
[-releaseMouse] release the mouse after using -leftClickNoRelease
Luego cree un flujo de trabajo Automator como un Servicio. Configure "Sin entrada" como entrada y "Vista previa" como aplicación. Agrega este Apple Script allí:
on run {input, parameters}
tell application "Preview" to activate
delay 1
set mouseToolsPath to (path to home folder as text) & "Downloads:MouseTools"
tell application "Preview"
set _b to bounds of the front window
set _x to item 1 of _b
set _y to item 2 of _b
set _width to item 3 of _b
end tell
set xpos to _x + (_width / 2)
set ypos to _y + 10
do shell script quoted form of POSIX path of mouseToolsPath & " -x " & (xpos as text) & " -y " & (ypos as text)
do shell script quoted form of POSIX path of mouseToolsPath & " -leftClick"
return input
end run
En este caso, mi binario MouseTools está en el directorio Downloads
.
Guárdalo y dale un nombre que recordarás. Asigne un método abreviado de teclado a este Servicio en Preferences.app bajo Keyboard - > Atajos .
He probado esto y funciona para mí.