|
Avid Pro Audio CommunityHow to Join & Post • Community Terms of Use • Help Us Help YouKnowledge Base Search • Community Search • Learn & Support |
#181
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
For some reason I cannot post any code to this board, access denied?!?!
|
#182
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
Here's a download link for the code I intended to post.
AppleScript_for_Johannes.scpt.zip Install cliclick in /usr/local/bin/. |
#183
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
this works like a charm. Thanks Oliver!
I've added in the script to type in the preset name. Just replace the line with "your preset name here" with the name of the preset you want to recall. https://drive.google.com/open?id=1Da...7MlX5Hb99y_mxN The rest is up to you how you want to implement the script. keep in mind, to install cliclick in the specified directory you will have to show hidden files and folders in the Finder. The easiest way to do this is open the Finder window and hold Commnd+Shift+. Then drop the cliclick file in the appropriate folder. cliclick can be downloaded here https://www.bluem.net/en/projects/cliclick/ |
#184
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
thanks a lot guys. thats it!
i added: click button "RENDER" after the first end tell. wow, now i have to make sure not to move my mouse while executing the macro… otherwise it could do a lot of mess. i wonder if there is way to tell applescript to block mouse or trackpad inputs during the macro¿ |
#185
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
not really sure about that. Considering the script runs in a matter of seconds I wouldn't think it would be a big deal to just take your hand off the mouse when using the shortcut key to run the service/script.
by the way. this script only works if the De-click window is already showing on screen. I've written a script that will call up the De-click, or any other plugin, if it's not already showing, then execute the remaining commands. A lot of folks I know use Xkeys for executing these various scripts while editing and such. Makes for a really great workflow. Personally, I've made some user softkeys on the S6 execute these scripts so I don't need Xkeys. |
#186
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
i see. just tested it with my macbook and its trackpad… will see how it works in my studio. probably just like a dream.
at work the rx declicker is always visible on the second monitor since i use it the whole time. and yes using a xkeys - one key triggering – is great. now i make 3 declick presettings from subtle to hard and map them on 3 keys. ace! what makes a lot of sense regarding workflow: i added & " -r " to the shell part at the end of the script which preserves the cursor position on the screen. so you didnt have to "pick up" the cursor from the declick window over and over again. Last edited by johannes1; 01-19-2019 at 01:05 PM. |
#187
|
||||
|
||||
Re: Automation AppleScripts for Pro Tools (Mac)
test
Code:
test |
#188
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
2nd test...
Code:
Thx Drew! |
#189
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
Hello,
I'm not sure anyone will be able to help with me, but I've been trying to write a script that will open the pan window of the selected track. I have successfully done it by looking at the track list group and cycling through all the tracks (which are rows) and finding the first track that is selected. I then take the string from a button that belongs to that row/track and format it to the string I need to actually call on that specific track in the edit window. Below is the script that works in Pro Tools Ultimate 2018: Code:
tell application "System Events" if exists (process "Pro Tools") then tell process "Pro Tools" tell (1st window whose title contains "Edit: ") -- Essentially gets the title of all the tracks in the track list, which is the only place I've found that tells you what is selected. set buttonList to title of (1st button of UI element 2 of row of table "Track List" whose title contains "Selected") repeat with theItem in buttonList if theItem contains "Selected" then -- Formats the string to what it needs to be to access it's buttons by stripping "Selected. " from the start of it and then correctly formats the type of track it is, which you don't have to do in v2019 set selectedTrack to text of theItem set AppleScript's text item delimiters to "Selected " set theTextItems to every text item of selectedTrack set AppleScript's text item delimiters to "" set selectedTrack to theTextItems as string set AppleScript's text item delimiters to " audio track" set theTextItems to every text item of selectedTrack set AppleScript's text item delimiters to "- Audio Track" set selectedTrack to theTextItems as string set AppleScript's text item delimiters to " auxiliary track" set theTextItems to every text item of selectedTrack set AppleScript's text item delimiters to "- Aux Track" set selectedTrack to theTextItems as string set AppleScript's text item delimiters to " master track" set theTextItems to every text item of selectedTrack set AppleScript's text item delimiters to "- Master Track" set selectedTrack to theTextItems as string end if end repeat -- Confirms the button is there before clicking it if exists (button "Output Window button" of group "Audio IO" of group selectedTrack) then click button "Output Window button" of group "Audio IO" of group selectedTrack else return end if end tell end tell end if end tell And since the string was changed a bit this is the code for Pro Tools Ultimate 2019.5: Code:
tell application "System Events" if exists (process "Pro Tools") then tell process "Pro Tools" tell (1st window whose title contains "Edit: ") -- Essentially gets the title of all the tracks in the track list, which is the only place I've found that tells you what is selected. set buttonList to title of (1st button of UI element 2 of row of table "Track List" whose title contains "Selected") repeat with theItem in buttonList if theItem contains "Selected" then -- Formats the string to what it needs to be to access it's buttons by stripping "Selected. " from the start of it set selectedTrack to text of theItem set AppleScript's text item delimiters to "Selected. " set theTextItems to every text item of selectedTrack set AppleScript's text item delimiters to "" set selectedTrack to theTextItems as string end if end repeat -- Confirms the button is there before clicking it if exists (button "Output Window button" of group "Audio IO" of group selectedTrack) then click button "Output Window button" of group "Audio IO" of group selectedTrack else return end if end tell end tell end if end tell Now while these scripts work, when a session gets big with a lot of tracks it can take way to long for the script to complete. I believe the bottleneck is that is essentially iterates through all the tracks twice, but I haven't found a more optimized way of doing it. Soundflow does something similar and it does it much quicker. While I think Soundflow is an incredible program, I need to personally customize my code because I'm constantly trying new things and tweaking. If no one know the answer to this, hopefully someone will benefit from the above scripts. And thank you to Oliver for doing all the hard work for this thread. |
#190
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
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 Using this script you can change it to open any of the visible inserts, sends, and other buttons on the track. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pro Tools 12 Trim Automation | [email protected] | Pro Tools 12 | 2 | 08-16-2015 04:25 AM |
Pro Tools 11.2.1 Automation Bug?! | Gneal550 | Pro Tools 11 | 1 | 11-22-2014 01:15 PM |
GRM tools automation bug? | D'Animation | Pro Tools TDM Systems (Mac) | 6 | 10-08-2014 08:21 AM |
scripting Pro Tools; automation | Bermaster | 003, Mbox 2, Digi 002, original Mbox, Digi 001 (Mac) | 12 | 10-01-2004 12:38 PM |
AppleScripts and other Macros for PT | Bergeron | Tips & Tricks | 1 | 11-15-1999 06:55 PM |