error "Application isn’t running." number -600 from application "System Events"
tell application "System Events" to tell application process "Metronome"
tell application "Metronome" to activate
tell group 1 of group 2 of group 1 of group 1 of window 1
tell button 3
click
end tell
end tell
end tell
Thanks in advance,
Kalman
error "System Events got an error: Can’t get group 2 of group 1 of group 1 of window 1 of application process 1 whose bundle identifier = \"is.gtmetronome\". Invalid index." number -1719
The app couldn't be scriptable? Maybe... Or what else?-- Use this script as a wrapper for GUI Scripting statements when you are confident
that GUI Scripting is available and enabled or that the user knows how to enable it if necessary
activate application "Metronome"
tell application "System Events"
tell process "Metronome"
-- insert GUI Scripting statements here:
tell window 1
tell group 1
tell group 1
tell group 2
tell group 1
tell button 3
click it
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell
error "System Events got an error: Can’t get group 2 of group 1 of group 1 of window 1 of process \"Metronome\". Invalid index." number -1719 from group 2 of group 1 of group 1 of window 1 of process "Metronome"
What do you think about it?
Best,
Kalman
tell application "System Events" to tell application process "Metronome" to click button 3 of group 2 of group 1 of group 1 of group 2 of group 1 of group 1 of group 1 of group 1 of group 1 of window 1
Button 1 is decrement tempo
Button 2 is decrement tempo
Button 6 is TAP tempo
Button 7 opens size (time signature) pop up, but I can't work out how to go any further in this window with the sliders. Perhaps Rich might have an idea? The App is the first one that comes up in the UK app store by Ivan Chepranov
tell application "System Events" to tell application process "Metronome" to set value of text field 1 of group 2 of group 1 of group 1 of group 2 of group 1 of group 1 of group 1 of group 1 of group 1 of window 1 to "130". --sets bpm directly
Mic
tell application "System Events" to tell application process "Metronome" to increment static text 1 of group 2 of group 1 of group 3 of group 1 of group 1 of group 2 of group 1 of group 1 of group 1 of group 1 of group 1 of window 1
tell application "System Events" to tell application process "Metronome" to increment image 1 of group 2 of group 1 of group 3 of group 1 of group 1 of group 2 of group 1 of group 1 of group 1 of group 1 of group 1 of window 1
tell application "System Events" to tell application process "Metronome" to click button 1 of group 1 of group 3 of group 1 of group 1 of group 2 of group 1 of group 1 of group 1 of group 1 of group 1 of window 1
tell application "System Events" to tell application process "Metronome"
set allElements to UI elements of window 1set allInfo to {}set i to 0repeat until i = (count allElements)set eachElement to item (i + 1) of allElementsset end of allInfo to value of eachElementtryset allElements to allElements & UI elements of eachElementend tryset i to i + 1end repeatend tellallInfo
Result:
{missing value, missing value, missing value, missing value, " ", missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, "70", missing value, missing value, missing value, "", missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value, missing value}
get value of text field 1 of group 2 of group 1 of group 1 of group 2 of group 1 of group 1 of group 1 of group 1 of group 1 of window " " of application process "Metronome"
class of UI elements of group 2 of group 1 of group 1 of group 2 of group 1 of group 1 of group 1 of group 1 of group 1 of window 1
--> {group, button, text field, button, group, button, button, button, button, button}
description of every button of group 2 of group 1 of group 1 of group 2 of group 1 of group 1 of group 1 of group 1 of group 1 of window 1
--> {"–", "+", "button", "button", "button", "Tap", "4/4"}
I downloaded an app called "metronome" from app store.