Avid Pro Audio Community

Avid Pro Audio Community

How to Join & Post  •  Community Terms of Use  •  Help Us Help You

Knowledge Base Search  •  Community Search  •  Learn & Support


Avid Home Page

Go Back   Avid Pro Audio Community > Pro Tools Software > Tips & Tricks
Register FAQ Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #71  
Old 02-28-2016, 06:42 AM
Sreejesh Sreejesh is offline
Member
 
Join Date: Oct 2012
Location: Mumbai
Posts: 5
Default Re: Automation AppleScripts for Pro Tools (Mac)

You can have a look at some of the scripts I posted here:

http://film-mixing.com/2016/01/13/ap...d-dolby-atmos/

They could be helpful, in case. :)
Reply With Quote
  #72  
Old 03-01-2016, 01:13 PM
Oliver M Oliver M is offline
Member
 
Join Date: Dec 1969
Location: Europe
Posts: 1,107
Default Re: Automation AppleScripts for Pro Tools (Mac)

Quote:
Originally Posted by Marco Bernardo View Post
Now I'm trying to do a loop with a choose list (infinite until I enter cancel)

I already did this



It will loop but only the number of the "set" I've chosen in this case {"1", "2", "3"} 3 times.

even for cancel I need to cancel it 3 times ehehe
I am not sure what you are trying to achieve, your description is very poor.
AFAIK having a dialog open while waiting for things being done is not possible as AppleScript is single threaded. There may be workarounds but I do not know anything about them.
Reply With Quote
  #73  
Old 03-01-2016, 02:33 PM
Marco Bernardo's Avatar
Marco Bernardo Marco Bernardo is offline
Member
 
Join Date: Jan 2007
Location: Lisboa, Portugal
Posts: 787
Default Re: Automation AppleScripts for Pro Tools (Mac)

Quote:
Originally Posted by Oliver M View Post
I am not sure what you are trying to achieve, your description is very poor.
AFAIK having a dialog open while waiting for things being done is not possible as AppleScript is single threaded. There may be workarounds but I do not know anything about them.
Hi Oliver,

I moved to ApplescriptObjC and I accomplished to do what I need.

Basically I was trying to make a list where I could choose and when it finished do it returned again to the chosen list, instead of quit the choose list.

Thanks for your time and help.
__________________
Marco Bernardo

Dialog Editor, Sound Designer, Re-Recording mixer

nMacPro 6Core/D500/512GB/64Gb ram | PT HD 12 HDN Thunderbolt | HD OMNI | Avid Artist Mix | Novation Impulse 25 | Waves Mercury Native | Audioease All In Bundle | SoundToys | McDSP Classic Pack | DUY Overpack | Arturia Beatstep Pro
Reply With Quote
  #74  
Old 03-07-2016, 06:17 PM
Oliver M Oliver M is offline
Member
 
Join Date: Dec 1969
Location: Europe
Posts: 1,107
Default Re: Automation AppleScripts for Pro Tools (Mac)

Quote:
Originally Posted by Marco Bernardo View Post
Hi Oliver,

I moved to ApplescriptObjC and I accomplished to do what I need.

Basically I was trying to make a list where I could choose and when it finished do it returned again to the chosen list, instead of quit the choose list.

Thanks for your time and help.
Elaborate on what you have done, please.
We'd like to learn!
Reply With Quote
  #75  
Old 03-08-2016, 06:26 PM
Marco Bernardo's Avatar
Marco Bernardo Marco Bernardo is offline
Member
 
Join Date: Jan 2007
Location: Lisboa, Portugal
Posts: 787
Default Re: Automation AppleScripts for Pro Tools (Mac)

LOL I've learn from you Oliver ehehe You've been a great help.

Basically I use all the applescript code in conjunction of Objective C, It's called ASOBJC or ApplescriptObjC.

I've installed Xcode and "design" the app, and then link the handlers (I think is the name that is called).

But yes, I've forgot to share, here it is.

Quote:
-
-- AppDelegate.applescript
-- MB_ProToolsBackup
--
-- Created by Admin on 01/03/16.
-- Copyright (c) 2016 Marco Bernardo. All rights reserved.
--

script AppDelegate
property parent : class "NSObject"

property shortDelay : 0.3
property medDelay : 0.5
property longDelay : 1
property suplongDelay : 5
property megaDelay : 15

-- IBOutlets
on applicationWillFinishLaunching_(aNotification)
-- Insert code here to initialize your application before any files are opened
end applicationWillFinishLaunching_

on applicationShouldTerminate_(sender)
-- Insert code here to do any housekeeping before your application quits
return current application's NSTerminateNow
end applicationShouldTerminate_


on cliClick(coordinate)
do shell script "/opt/local/bin/cliclick " & " -r " & coordinate
end cliClick

on ptBackup()

activate application "Pro Tools"
delay shortDelay
tell application "System Events"
tell application process "Pro Tools"

set sessioname to (name of first window whose title contains "Edit: ")
tell window sessioname -- variable of Pro tools edit window

click button "Track List Show/Hide"
tell button "Track List pop-up" --perform action "AXPress" of button 5
set {xPosition, yPosition} to position
set {xSize, ySize} to size
my cliClick("c:" & xPosition + (xSize div 2) & "," & yPosition + (ySize div 2))

end tell
key code 36
click button "Track List Show/Hide"
click button "Show/Hide Clip List"
key code 36
end tell
tell (1st window whose title contains "Edit: ")
key code 0 using {option down}
key code 0 using {command down}
key code 125 using {command down, option down, control down}
#repeat 2 times
#key code 81 using {command down}
#end repeat
key code 32 using {command down, shift down}
key code 11 using {command down, shift down}
delay shortDelay
key code 36
delay medDelay
repeat 3 times
key code 36 using {option down}
delay medDelay
end repeat

click button "Show/Hide Clip List"

repeat 3 times
key code 0 using {option down}
end repeat
end tell

delay shortDelay

click menu item "Save Copy In..." of menu 1 of menu bar item "File" of menu bar 1
delay shortDelay
tell window "Save Session Copy"
tell checkbox "Audio Files"
set {xPosition, yPosition} to position
set {xSize, ySize} to size
my cliClick("c:" & xPosition + (xSize div 2) & "," & yPosition + (ySize div 2))
end tell
tell checkbox "Convert to Specified Format"
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
keystroke return
delay shortDelay
key code 124
keystroke " VO"
key code 126
repeat 3 times
key code 124 using {shift down, option down}
end repeat
key code 123 using {shift down, option down}
key code 51
key code 125
end tell
end tell
end ptBackup

on theBackup_(sender)
display notification "Backup process initialised, please don't touch the mouse, Thank you" with title "BACKUP"
my ptBackup()
display notification "Finalised" with title "BACKUP"
end theBackup_

end script
There's more thing's I'd want to do, but I'm in middle of re-recording mixing sessions... Need to get more time to put my head again on this.
__________________
Marco Bernardo

Dialog Editor, Sound Designer, Re-Recording mixer

nMacPro 6Core/D500/512GB/64Gb ram | PT HD 12 HDN Thunderbolt | HD OMNI | Avid Artist Mix | Novation Impulse 25 | Waves Mercury Native | Audioease All In Bundle | SoundToys | McDSP Classic Pack | DUY Overpack | Arturia Beatstep Pro
Reply With Quote
  #76  
Old 03-08-2016, 10:30 PM
munkitkat's Avatar
munkitkat munkitkat is offline
Member
 
Join Date: Mar 2016
Location: New York
Posts: 7
Default Re: Automation AppleScripts for Pro Tools (Mac)

OK, seems like it didn't work out Marco.

Anyone else?
Reply With Quote
  #77  
Old 03-09-2016, 12:36 PM
Oliver M Oliver M is offline
Member
 
Join Date: Dec 1969
Location: Europe
Posts: 1,107
Default Re: Automation AppleScripts for Pro Tools (Mac)

Quote:
Originally Posted by munkitkat View Post
OK, seems like it didn't work out Marco.

Anyone else?
I believe you gotta create a new Cocoa-AppleScript Project in Xcode, then compile it as an app. I did a quick test and it did not work with Marco's code here either.
Marco is probably going to answer this one.

I am no fan of AppleScript apps or applets but thats just my own humble opinion.
They make sense for drag&drop stuff but for PT... I see no benefit.
Reply With Quote
  #78  
Old 03-09-2016, 12:37 PM
Oliver M Oliver M is offline
Member
 
Join Date: Dec 1969
Location: Europe
Posts: 1,107
Default Re: Automation AppleScripts for Pro Tools (Mac)

Quote:
Originally Posted by Marco Bernardo View Post
Basically I use all the applescript code in conjunction of Objective C, It's called ASOBJC or ApplescriptObjC.

I've installed Xcode and "design" the app, and then link the handlers (I think is the name that is called).
I know about AppleScriptObjC. I used it it my “Create Session Template” script to check for valid characters in the name dialog as this wouldn’t have worked with plain AppleScript.
Of course ASObjC works with Yosemite and higher only. ;-)
Reply With Quote
  #79  
Old 03-09-2016, 02:46 PM
Marco Bernardo's Avatar
Marco Bernardo Marco Bernardo is offline
Member
 
Join Date: Jan 2007
Location: Lisboa, Portugal
Posts: 787
Default Re: Automation AppleScripts for Pro Tools (Mac)

Quote:
Originally Posted by munkitkat View Post
OK, seems like it didn't work out Marco.

Anyone else?
This video help me a lot understanding how to do it. I've forgot to mention, that a Button need to be created and binding with the theBackup_(sender).

Quote:
Originally Posted by Oliver M View Post
I know about AppleScriptObjC. I used it it my “Create Session Template” script to check for valid characters in the name dialog as this wouldn’t have worked with plain AppleScript.
Of course ASObjC works with Yosemite and higher only. ;-)
Yeah, I know you know ASOBJC :) you're my mentor, you've helped and point me the right directions.

Here is a zip with the xcode project, just need to be compiled.

I early forgot to mention that it need to be "design" the app, basically a button and binding the theBackup_(sender).

Check the link -> HERE

It was late yesterday SORRY!!!

ps1: please copy the cliclick app to /opt/local/bin folder (or you can change to wherever you have it)
__________________
Marco Bernardo

Dialog Editor, Sound Designer, Re-Recording mixer

nMacPro 6Core/D500/512GB/64Gb ram | PT HD 12 HDN Thunderbolt | HD OMNI | Avid Artist Mix | Novation Impulse 25 | Waves Mercury Native | Audioease All In Bundle | SoundToys | McDSP Classic Pack | DUY Overpack | Arturia Beatstep Pro

Last edited by Marco Bernardo; 03-10-2016 at 02:54 PM.
Reply With Quote
  #80  
Old 03-10-2016, 06:25 AM
boomish69 boomish69 is offline
Member
 
Join Date: Jul 2009
Posts: 10
Default Re: Automation AppleScripts for Pro Tools (Mac)

Thanks for the scripts Oliver, Do you know anyway I can get it to work for 11 & 12 on the same system? If I try and add either to the security window it will only add one "Pro Tools"

It seems it only likes Pro Tools 12, I thought at first it was a naming thing as I renamed 11 "Pro Tools 11 then 12 is called "Pro Tools" but I rename them the other way around the security window shows Pro Tools 12. I then tried removing it and adding only 11 this did get it to work in 11 but sometimes the commands stop working and I get an error "system events. Can't get window "new tracks" of process "Pro Tools". (-1728)

Any solution idea's? apart from run 12 :)

2 reasons, I work a lot with others that only run 11 and I have yet to get 12 to run very stable.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -7. The time now is 04:28 AM.


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