Auto-Align Post "Align to track upon it"
Title
Auto-Align Post "Align to track upon it"
What do you expect to happen when you run the script/macro?
Auto-Align Post - Align to track upon it.
Are you seeing an error?
What happens when you run this script?
select clip to be aligned activate script move selection up set this as key input in AAP
How were you running this script?
I used a keyboard shortcut within the target app
How important is this issue to you?
5
Details
{ "inputExpected": "Auto-Align Post - Align to track upon it.", "inputIsError": false, "inputWhatHappens": "select clip to be aligned\nactivate script\nmove selection up\nset this as key input in AAP", "inputHowRun": { "key": "-Mpfwh4RkPLb2LPwjePT", "title": "I used a keyboard shortcut within the target app" }, "inputImportance": 5, "inputTitle": "Auto-Align Post \"Align to track upon it\"" }
Source
sf.keyboard.press({
keys: "p",
fast: true,
executionMode: "Foreground",
onCancel: "Abort",
onError: "ThrowError",
});
//Open the plugin and save the plugin window to the "asWin" variable
var asWin = sf.ui.proTools.audioSuiteOpenPlugin({
category: 'Other',
name: "Auto-Align Post"
}).window;
//Set processing options
asWin.audioSuiteSetOptions({
processingInputMode: "ClipByClip",
processingOutputMode: "CreateIndividualFiles"
});
//Get first track from selection
var name = sf.ui.proTools.selectedTrackNames[0];
//Focus AAP
var asWin = sf.ui.proTools.getAudioSuiteWindow("Auto-Align Post");
asWin.elementRaise();
//Set Key input
sf.ui.proTools.appActivate();
var keyInputBtn = sf.ui.proTools.firstAudioSuiteWindow.invalidate().popupButtons.whoseTitle.is('Key Input').first;
keyInputBtn.popupMenuSelect({
menuPath: [name]
});
sf.keyboard.press({
keys: ";",
fast: true,
executionMode: "Foreground",
onCancel: "Abort",
onError: "ThrowError",
});
Links
User UID: qxvuxIROjqhCgyum17n87NP7TKo2
Feedback Key: sffeedback:qxvuxIROjqhCgyum17n87NP7TKo2:-N9FWjp1f5uKQwK4PZak
- Daniel Perez @daniel_perez
select clip to be aligned
activate script
move selection up
set this as key input in AAP (works fine!)- move selection down (here the script won't continue)
(render)
i'm looking for a working wait command.
wait for milliseconds won't work.
wait for no modals won't work.
raise edit window and wait ms won't work.maybe, a wait for key input dropdown menu to be closed?
- move selection down (here the script won't continue)
Daniel Perez @daniel_perez
- OOwen Granich-Young @Owen_Granich_Young
Try using click menu item : edit menu extend selection up and remove selection from bottom instead of key press Semi-colon
On my phone hope that helps
Functions for menu click to copy and paste are in here:
What would be the best way to move a section up/down across tracks in PT?Bests
Owen
- BIn reply todaniel_perez⬆:Brian Armstrong @Brian_Armstrong
Might also be more efficient to align to track under. In other words, if you have boom on top and lav on bottom and you want to align lav to the boom, highlight the selection on the boom track, then run:
open Auto-Align, select current track as key input, then move your selection down and render.
Maybe?