I tried to find AppleScripts online that choose from a menu list, but I can't tweak them to work for my situation... I have a pop window when I use Pro Tools, and I'd like to have an AppleScript to select Interleaved Audio in the menu list for File Format. I guess I could try to use the FOUND IMAGE action but I'd like to stay away from actions based on an image. I tried to access that area with key commands but can't find any.....Thanks!!
Download the demo of UI Browser. It will automatically spit out enough code to at least select the right pop up button. Once you've got that, post the script-in-progress here and we can get it working.
Someone else (who has PT) might be able to just supply a script for you, but using UI Browser is a great educational tool, so I recommend trying it anyway.
Ah! Pro Tools scripting is my bread and butter! UI Browser is a HUGE help getting this stuff working, it's going to be end of life soon but it's an invaluable resource if you're scripting pro tools.
The pop up button/menus in the track bounce/bounce to disk dialogs in pro tools change their names based on the status, so you have a couple options:
In order of what i'd suggest.
Use a bounce preset to set your desired values, and recall them in your macro using the Control-1-5 keys when the window opens.
Get the location of the UI element you want to click via applescript. There's a couple ways to do this, in the case of Interleaved/Non-Interleaved/Mono-Summed you could use if/else based on the pop-up button's name, since there are only 3 potential values for the button, OR target it based on the button number in the UI. The issue with this is that it's likely to change in some pro tools update if they add or reorder the menu at all.
This macro will click the button whether it's on interleaved or not, if you want to check the status you'll have to check if the pop up button "Interleaved' (or other possibilities) exists to address it by name. This macro works, but i'd suggest using the bounce presets, as they will be quicker and more reliable.
I don't have PT, but clicking the button can usually be done directly:
tell application "System Events"
tell process "Pro Tools"
click pop up button 2 of group "Audio" of window "Track Bounce"
keystroke "i"
key code 36
end tell
end tell
It certainly can and this works. But I've experienced up to about a 5 second delay after an applescript click / keystroke when scripting pro tools, so i do all my clicking in keyboard maestro.
Totally. That definitely works. Lots of ways to skin the cat as they say. Track preset is by far the most efficient in this scenario, but this is would be the way to go if you NEED to check the UI and click the button.