Kevin,
great job! AppleScript being slow here and there is a normal issue, especially with PT. I wouldn't worry too much.
And great to see someone finally contributing to this thread again. 😉
Oliver
Quote:
Originally Posted by Kevin Peters
To improve upon my post above, I looked through the UI elements of the Track List again, and it turns out that the rows (tracks) in the "Track List" table have a parameter called "Selected" that has a true or false value. Using this new information here is my updated script for 2019.5:
Code:
tell application "System Events"
if exists (process "Pro Tools") then
tell process "Pro Tools"
tell (1st window whose title contains "Edit: ")
set selectedTrack to title of button of UI element 2 of (1st row of table "Track List" whose selected is true)
set formattedString to text of selectedTrack as string
set AppleScript's text item delimiters to "Selected. "
set theTextItems to every text item of formattedString
set AppleScript's text item delimiters to ""
set formattedString to theTextItems as string
click button "Output Window button" of group "Audio IO" of group formattedString
end tell
end tell
end if
end tell
This dramatically increases the speed of the script, although there still is a 1/2 second to 1 second delay in really big sessions with hundreds of tracks. That being said in a small session it's a very short delay. I wonder if there is still a way to speed it up. I got rid of the safety check on the button so save a split second.
Using this script you can change it to open any of the visible inserts, sends, and other buttons on the track.
|