I’m using this script to increment a slider value:
activate application “App”
tell application “System Events”
tell process “App”
perform action “AXIncrement” of slider 141 of group 1 of front window
end tell
end tell
This slider has about 1000 increment & decrement steps, so in order to smoothly control this slider I need to perform this action very quick.
Inside this group (group 1) there are about 400 sliders, so in reality it takes almost a second to perform.
Is there a way to lock the script (similar to ˜Accessibility Inspector’ command F7 ˜element lock’) to that specific path and every time the script runs - to just perform the “AXIncrement” action instead of browsing again through the whole path?
Thanks in advance!
Gadi.
Model: Mac Pro
AppleScript: 2.7
Browser: Firefox 52.0
Operating System: Mac OS X (10.10)
set nbIncrerments to 100 # adjust to fit your needs
activate application "App"
tell application "System Events"
tell process "App"
repeat nbIncrements times
perform action "AXIncrement" of slider 141 of group 1 of front window
end repeat
end tell
end tell
Yvan KOENIG running Sierra 10.12.4 in French (VALLAURIS, France) lundi 17 avril 2017 22:44:11
But I’m not looking to skip all those increment steps, I want to browse/scroll through them.
For example when using ‘UI Browser’ to increment/decrement these values - there’s no pause after clicking the action - it happens immediately.
Another example would be something similar to ‘ControllerMate’ block that is locked to a certain ui element action, when physically moving a usb controller - the ui element responds immediately.
Is it only possible with an open application and not with a script?