Avid Pro Audio Community

Avid Pro Audio Community (https://duc.avid.com/index.php)
-   Tips & Tricks (https://duc.avid.com/forumdisplay.php?f=4)
-   -   A script for "Show/hide automation lanes" ? (https://duc.avid.com/showthread.php?t=414495)

liquidshock 03-15-2021 12:02 PM

A script for "Show/hide automation lanes" ?
 
Hi guys,
does anybody know a script for the shortcut of the button "Show/hide automation lanes" , please ?
Thank you very much !

Oliver M 08-16-2021 06:57 AM

Re: A script for "Show/hide automation lanes" ?
 
Quote:

Originally Posted by liquidshock (Post 2596112)
Hi guys,
does anybody know a script for the shortcut of the button "Show/hide automation lanes" , please ?
Thank you very much !



Here's an AppleScript to Show/hide automation lanes for the currently selected track.


Code:


if ptIsRunning() then
    tell application "System Events"
        tell process "Pro Tools"
            set frontmost to true
            tell (1st window whose title contains "Edit: ")
                try
                    set selectedTrack to title of button of UI element 2 of (1st row of table "Track List" whose selected is true)
                    set targetTrack to text of selectedTrack as string
                    set AppleScript's text item delimiters to "Selected. "
                    set fullTrackName to every text item of targetTrack
                    set AppleScript's text item delimiters to ""
                    set targetTrack to fullTrackName as string
                   
                on error e number n
                    if the n is -1719 then
                        tell application "Pro Tools" to display alert "No track was selected." message " " buttons {"Cancel"} default button 1
                        return
                    else
                        tell application "Pro Tools" to display alert "An Error Occurred" message e & " (" & n & ")" buttons {"Cancel"} default button 1
                    end if
                end try
                click UI element "Show/hide automation lanes" of group targetTrack
            end tell
        end tell
    end tell
end if

on ptIsRunning()
    return application "Pro Tools" is running
end ptIsRunning


liquidshock 11-26-2021 02:00 PM

Re: A script for "Show/hide automation lanes" ?
 
I read only now !!! you're a genius ! Thank you very very very much !!!!

Oliver M 01-17-2022 04:23 PM

Re: A script for "Show/hide automation lanes" ?
 
Quote:

Originally Posted by liquidshock (Post 2620431)
I read only now !!! you're a genius ! Thank you very very very much !!!!


You are welcome but no, I am no genius by far. But you may consider to watch the Tips & Tricks section more closely or consider to pay for your custom wishes. Not everything in life is for free. Just a hint. ;)


All times are GMT -7. The time now is 05:33 PM.

Powered by: vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Limited. Forum Hosted By: URLJet.com