I'm making a macro to import many files into an audio sequencer.
After importing the files the application sets off converting the files and lastly asks if I want them sequential (One track) or parallel (Different tracks).
This macro has worked before so I was surprised when checking today that KM does not proceed with Left Arrow and Return to click the button Different tracks.
Sorry about that! Not my first time on a forum so I should have been more mindful.
Keyboard Maestro 10.2 on macOS 12.5.1
The application is Nuendo 12.0.40 that I can't remember have updated since it was working.
When running the 'Front Window Analysis Tool' nothing happens as long as the window to select tracks is open (and in front).
When running the tool after leaving the dialog (returning to Nuendo's main window) a blank Text Edit window called open_dX0igOu8.txt. BBEdit is also installed but does not open.
I'm not surprised System Events isn't seeing it. Many of those complex UI apps don't use standard macOS building blocks.
I missed that you demonstrated KM's Pause-Until action seeing the button...
Can you manually left and right arrow in that dialog?
That's not how those usually work – you usually have to tab or shift-tab – and the correct setting in the keyboard preferences must be active for dialog button/widget hopping to take place.
This doesn't work either. It seems like KM can't recognize there is a window to begin with.
@ccstone I can manually left and right arrow and tab as well to get to 'Different tracks'.
When importing the audio files Nuendo prompts several progress windows called 'Converting file...' with a button named 'Abort'. I've tried having KM wait for those to not exist. I can't use time based conditions since it's different how many files I import and for how long each progress window stays up and how small a gap there is between progress windows.
Okay, we're making progress!
I ran the script as usual and again it stopped on the pop up window.
I ran the 'If Button Exists' macro and it displayed Exists!
Update: It was indeed user error. Previously I had hit Return to import files and now started hitting Enter instead (thinking they were interchangeable). KM was simply waiting for me to press Return before proceeding.
I changed the Pause Until condition to be 'any of the following are true' and added 'Enter'