|
Avid Pro Audio CommunityHow to Join & Post • Community Terms of Use • Help Us Help YouKnowledge Base Search • Community Search • Learn & Support |
#221
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
Thanks for all your help with this!
It really makes a difference to my workflow, and I'm hugely appreciative. Is it possible to add a stop-check in the situation where I'm editing/typing the name of a track? For instance. Stop/cancel the script if the text enter dialog window is open?
__________________
Pro Tools 2024.3.0|Perpetual • MTRX Studio • HDX1 • Sync-X • S3 • Dock • Mac Mini 2018 - 3.2GHz i7 6-core macOS 13.6 • RAM 64GB DDR4 GPU AMD 6900XT 16GB • Monitor LG 32UL950-W |
#222
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
Quote:
|
#223
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
Quote:
But you should explain your entire workflow in order to get detailed help. What did the script do before the track rename window opens, what should be done when you have entered the new track name and pressed the OK button and so on. The more detailed the question the better the answer. 😉 |
#224
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
Quote:
The script is working fine, it's just when I go to enter text and need numerics it triggers my KM hotkey. (I know I could change my hotkey, but) I was thinking it might be possible to use the script to tell KM to check prior to firing if there is a text box open? I'm trying to figure out applescripts - *I missed out on learning anything like this in school, a little before my time unfortunately. Starting with something simple, I've been trying to select the "Clip by Clip" pop up button of the "Processing Input Mode" menu item. But I keep getting a kick back telling me I can't access that item. Here's what I've got. If you have a minute, I would really appreciate any guidance or insight into what I can do to improve. I installed Xcode to run the Accessibility Inspector because I thought that might help me. Quote:
I thought If I could get it to change to "Clip by Clip" at least I'll be half way there .. but I can't even do that. haha
__________________
Pro Tools 2024.3.0|Perpetual • MTRX Studio • HDX1 • Sync-X • S3 • Dock • Mac Mini 2018 - 3.2GHz i7 6-core macOS 13.6 • RAM 64GB DDR4 GPU AMD 6900XT 16GB • Monitor LG 32UL950-W Last edited by TrentWilliams; 09-17-2019 at 01:53 AM. |
#225
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
I do this by setting variables in KM (Plug-In, Preset, Processing Input Mode, Processing Output Mode), giving them to AppleScript and let AppleScript do the clicks with "cliClick" (which was mentioned by Oliver before).
You need some conditions to be checked e.g. is the AudioSuite already opened, which preset and processing modes are set etc. |
#226
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
Trent,
the following reply was prepared offline, before you edited your post and thus is based on the content of your former version. Quote:
Quote:
Try this: Code:
property shortDelay : 0.1 if ptIsRunning() then tell application "System Events" tell process "Pro Tools" set frontmost to true tell (1st window whose name contains "Audio Suite") try -- click button "Processing Input Mode" click pop up button "Processing Input Mode" delay shortDelay key code 126 -- Arrow up key / Selects the "clip by clip" option delay shortDelay keystroke return on error e number n tell application "Pro Tools" to display alert "An Error Occurred" message e & " (" & n & ")" buttons {"Cancel"} default button 1 end try end tell end tell end tell end if on ptIsRunning() return application "Pro Tools" is running end ptIsRunning Assuming cliclick is installed in usr/local/bin: Code:
property cliclickCLIPath : missing value property shortDelay : 0.1 set cliclickCLIPath to "usr/local/bin/cliclick" if ptIsRunning() then tell application "System Events" tell process "Pro Tools" set frontmost to true set asWindow to (1st window whose name contains "Audio Suite") try tell asWindow -- click button "Processing Input Mode" tell pop up button "Processing Input Mode" set {xPosition, yPosition} to position set {xSize, ySize} to size my cliClick("c:" & xPosition + (xSize div 2) & "," & yPosition + (ySize div 2)) end tell end tell delay shortDelay key code 126 -- Arrow up key / Selects the "clip by clip" option delay shortDelay keystroke return on error e number n tell application "Pro Tools" to display alert "An Error Occurred" message e & " (" & n & ")" buttons {"Cancel"} default button 1 end try end tell end tell end if on ptIsRunning() return application "Pro Tools" is running end ptIsRunning on cliClick(coordinate) do shell script quoted form of cliclickCLIPath & " -r " & coordinate end cliClick |
#227
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
Dear Community and Oliver,
First of all, thanks for sharing your knowledge in this fantastic thread. I was able to follow it and start building my scripts purely based on this information, very helpful indeed. Now, I am a little bit stuck and would love to kindly ask for your advice on the following issue. Your help would be greatly appreciated, and I will surely share my end result application here once it's working. Thanks in advance! |
#228
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
Dear Community and Oliver,
First of all, thanks for sharing your knowledge in this fantastic thread. I was able to follow it and start building my scripts purely based on this information, very helpful indeed. Now, I am a little bit stuck and would love to kindly ask for your advice on the following issue. I am working on Auto-Bounce program for Pro Tools. Essentially I aim to write a script which: - Opens Memory Locations window for the PT project - Clicks marker that has "Start" title - Shift-clicks marker that has "End" title - Bounces the project This is the bare bones of the script, I will make some additions to it once it's working. So far, everything in the script works apart from the Shift-click. I tried cliclick, I tried Apple Script modifiers, and somehow I can't get Shift modifier to work. I am attaching the Code itself in the next separate post as the forum somehow wouldn't allow it in this post. Your help would be greatly appreciated, and I will surely share my end result application here once it's working. Thanks in advance! |
#229
|
|||
|
|||
Dear Community and Oliver,
First of all, thanks for sharing your knowledge in this fantastic thread. I was able to follow it and start building my scripts purely based on this information, very helpful indeed. Now, I am a little bit stuck and would love to kindly ask for your advice on the following issue. I am working on Auto-Bounce program for Pro Tools. Essentially I aim to write a script which: - Opens Memory Locations window for the PT project - Clicks marker that has "Start" title - Shift-clicks marker that has "End" title - Bounces the project This is the bare bones of the script, I will make some additions to it once it's working. So far, everything in the script works apart from the Shift-click. I tried cliclick, I tried Apple Script modifiers and somehow I can't get Shift modifier to work. Here is the part of the code where Shift modifier doesn't work: Code:
--selection of markers from Start to End script tell application "System Events" tell process "Pro Tools" set asWindow to (1st window whose name contains "Memory Locations") try tell asWindow do shell script "usr/local/bin/cliclick kd:shift" repeat with aRow in row of table "Memory Locations" if name of static text of UI element 2 of aRow starts with "Start" then click static text "Start" of UI element 2 of aRow end repeat delay shortDelay repeat with aRow in row of table "Memory Locations" if name of static text of UI element 2 of aRow starts with "End" then click static text "End" of UI element 2 of aRow end repeat end tell delay shortDelay do shell script "usr/local/bin/cliclick ku:shift" end try end tell end tell Last edited by echoesoflife; 09-19-2019 at 07:10 PM. Reason: Problems with posting on the forum |
#230
|
|||
|
|||
Re: Automation AppleScripts for Pro Tools (Mac)
Quote:
|
|
|
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 |