Hi forum,
Is KM able to recognize the status of check-boxes, i. e. “this box is already checked, so don’t press button”?
Thanks,
A. P.
Hi forum,
Is KM able to recognize the status of check-boxes, i. e. “this box is already checked, so don’t press button”?
Thanks,
A. P.
What app? Web Browser or Mac app?
App is Finale v. 25.
KM recognizes the button via the Press Button action.
Problem is the following: if the window is closed and the macro completed, the next time the macro is used, the Push Button Action will uncheck the box, though for a successful execution of the macro, the boxed must be checked. Ergo: the macro only works successfully every other time.
Thx,
A. P.
This should fix the issue:
That’s it! Thank you!
I am struggling with this one on a window in Pro Tools. I think Keyboard Maestro might be looking to the right where you can type in a measure number. I know the text is right for "Renumber song start to:" because if I choose "exists" it shows true and false if I choose "Does not exist" I have gone through every option and nothing changes from True to False when I check or uncheck the box. I need to know if it is checked so I can then do another action to uncheck it. Does anyone have any ideas?
I was able to solve this particular problem after quite some time and getting UI Browser to work in Sonoma but it really seems like there is a better way with just using Keyboard Maestro. I would still love to know what that is.
For what it is worth here is the AppleScript code.
activate application "Pro Tools"
tell application "System Events"
tell process "Pro Tools"
-- Get the value of the button
set buttonValue to value of button "Renumber song start to:" of window "Time Operations"
-- If the button is checked, click it
if buttonValue is "checked" then
click button "Renumber song start to:" of window "Time Operations"
end if
end tell
end tell
Just following up with this to see if anyone knows a way to get button variables using Keyboard Maestro to reference rather than trying to reference through AppleScript and the deprecated UI Browser. I never knew how it did it's magic but it has sure helped a lot. Hopefully this is something Keyboard Maestro can take on and that I have just missed as a feature in the software after all these years.
Hello @skillet
Based on what you described (no detection of the Button via Button Condition) there is only GUI Scripting with AppleScript or working with Found Image an option to detect what you are looking after.
Based on performance I would definitely recommend using the AppleScript variant - which you already have since Found Image might not only possibly take way longer, it will also take more resources to find the Image.
Also you maybe know that you will have to use every time a different Image when anything based on your setup will change (Lightmode, Darkmode, Windowbackground changes made by the developers… ). I’m not going to tell you everything that maybe could change and break your Macro. But I hope this gives you the confidence to stay using the Scripted solution you already have.
Greetings from Germany
Tobias
Thanks Tobias, I kind of figured that was the case, the based on image is wonderful but like you said slower and so many variables and possibilities for it to break. I was hoping there was some replacement that anyone knew of for UI Browser. It took a bit of time to extract the info on the current version and with UI Browser. Thanks for the feedback.
Search the forum. @noisneil has posted a macro that can get info from the UI, @ccstone and @CJK have posted scripts.
Which I haven't got links for because I just poke around manually. It doesn't take long to understand how elements are ordered in a window and how they are nested. Just use your script editor and return every UI element of window 1
, pick and element and return every UI element...
of that, and so on.
I think this is the one.