Thanks for this, very much appreciated.
I'm having difficulty getting either to work unfortunately. Neither are quite formatting the file names in they way Audition needs them but also both methods cause the file order to be wrong.
Audition wants the file list presented as (the file names will change every time but they should always have a numeric prefix to denote the order:
"001_Intro.WAV" "002_Coming Up.WAV" "003_Paul Hollywood.WAV" "004_talking about.WAV" "005_dont tell me i can't.WAV" "006_life today.WAV" "007_telling it like it is.WAV" "008_ask suzie.WAV"
The first script created a list that looked like this:
"F:\116 Woman 160418\Side 1\008_ask suzie.WAV"" ""F:\116 Woman 160418\Side 1\007_telling it like it is.WAV"" ""F:\116 Woman 160418\Side 1\006_life today.WAV"" ""F:\116 Woman 160418\Side 1\005_dont tell me i can't.WAV"" ""F:\116 Woman 160418\Side 1\004_talking about.WAV"" ""F:\116 Woman 160418\Side 1\003_Paul Hollywood.WAV"" ""F:\116 Woman 160418\Side 1\002_Coming Up.WAV"" ""F:\116 Woman 160418\Side 1\001_Intro.WAV"" "
There are four issues with this:
1. It includes the path to the file which I don't think Audition likes.
2. There are additional " " between each file
3. There is a trailing " " at the end
4. The files are in reverse order
The second script created a list that looked like this:
"F:\116 Woman 160418\Side 1\008_ask suzie.WAV" "F:\116 Woman 160418\Side 1\007_telling it like it is.WAV" "F:\116 Woman 160418\Side 1\006_life today.WAV" "F:\116 Woman 160418\Side 1\005_dont tell me i can't.WAV" "F:\116 Woman 160418\Side 1\004_talking about.WAV" "F:\116 Woman 160418\Side 1\003_Paul Hollywood.WAV" "F:\116 Woman 160418\Side 1\002_Coming Up.WAV" "F:\116 Woman 160418\Side 1\001_Intro.WAV"
This is better in that there is the correct use of " " but the order is still reversed and it includes the path.
Just for info, earlier in the macro the paths for up to 4 folders containing the WAV files to be imported are captured and stored as the following variables:
AF1
AF2
AF3
AF4
After the paths are captured, because there are many stages of the process that are run multiple times, I've broken each stage down into subroutines
So each GetFileList bit will replace part of the Import Files and Reverse Files subroutines.
This is the full code there are a couple of bits I'm still working on which I've not finished so will look wrong one being the GetCheckBox which I can't seem to get to work
Code: Select all
//Make Sure Caps Lock is off
CapsOff
//Ask if the magazine has multiple parts
Let>INPUT_BROWSE=0
Input>TotalParts,How Many Parts Does This Magazine Have?,2
IF>TotalParts=""
Exit>0
EndIF
//Can never be 1,3 or more than 4 parts.
IF>TotalParts=1
Exit>0
Endif
If>TotalParts=2
Let>INPUT_BROWSE=2
Input>AF1,Please select the folder containing the files for Part 1.,
IF>AF1=""
Exit>0
EndIf
Let>INPUT_BROWSE=2
Input>AF2,Please select the folder containing the files for Part 2.,
IF>AF2=""
Exit>0
EndIf
Else
Let>INPUT_BROWSE=2
Input>AF1,Please select the folder containing the files for Part 1.,
IF>AF1=""
Exit>0
EndIf
Let>INPUT_BROWSE=2
Input>AF2,Please select the folder containing the files for Part 2.,
IF>AF2=""
Exit>0
EndIf
Let>INPUT_BROWSE=2
Input>AF3,Please select the folder containing the files for Part 3.,
IF>AF3=""
Exit>0
EndIf
Let>INPUT_BROWSE=2
Input>AF4,Please select the folder containing the files for Part 4.,
IF>AF4=""
Exit>0
EndIf
EndIF
//Continue with rest of data gathering
Let>INPUT_BROWSE=0
Input>ProdNumber,Please Enter The Production Number?,150
If>ProdNumber=""
Exit>0
EndIF
Let>INPUT_BROWSE=0
Input>PubDate,Please Enter The Publication Date As YYMMDD?,
If>PubDate=""
Exit>0
EndIF
Let>INPUT_BROWSE=0
Input>ProducerName,Please Enter The Initials of The Audio Producer,
If>ProducerName=""
Exit>0
EndIF
Let>INPUT_BROWSE=2
Input>SaveDrive,Please Select Where You Want The File Saved,
If>SaveDrive=""
Exit>0
EndIF
//If there are two parts use subroutines
If>TotalParts=2
GoSub>Part1
GoSub>Part2
Else
GoSub>Part1
GoSub>Part2
GoSub>Part3
GoSub>Part4
EndIF
//PART 1 SUBROUTINE
SRT>Part1
Let>PartNo=1
//Make Sure Caps Lock is off
CapsOff
GoSub>ImportFiles
Send>%AF1%
GoSub>ReverseFiles
GoSub>OddSides
GoSub>SaveFile
End>Part1
//PART 2 SUBROUTINE
SRT>Part2
Let>PartNo=2
//Make Sure Caps Lock is off
CapsOff
GoSub>ImportFiles
Send>%AF2%
GoSub>ReverseFiles
GoSub>EvenSides
GoSub>SaveFile
End>Part2
//PART 3 SUBROUTINE
SRT>Part3
Let>PartNo=3
//Make Sure Caps Lock is off
CapsOff
GoSub>ImportFiles
Send>%AF3%
GoSub>ReverseFiles
GoSub>OddSides
GoSub>SaveFile
End>Part3
//PART 4 SUBROUTINE
SRT>Part4
Let>PartNo=4
//Make Sure Caps Lock is off
CapsOff
GoSub>ImportFiles
Send>%AF4%
GoSub>ReverseFiles
GoSub>EvenSides
GoSub>SaveFile
End>Part4
//IMPORT FILES SUBROUTINE
SRT>ImportFiles
SetFocus>Adobe Audition*
//Maximise the window
WindowAction>1,Adobe Audition*
Wait>1
//makes sure Audition is set to Edit view
Send>8
//Open Append
Press ALT
Send>f
Release ALT
Wait>1
Send>d
WaitWindowOpen>Open Append
Wait>2
//Set Files of type to All Supported Media
Press Alt
Send>t
Release Alt
Press Down
Press Home
Press Enter
//Locate to File Name Field
Press Alt
Send>n
Release Alt
Wait>1
END>ImportFiles
//REVERSE FILES SUBROUTINE
SRT>ReverseFiles
Wait>1
Press Enter
Wait>2
SetFocus>Open Append
Wait>1
//GetActiveWindow>Open Append,nXPos,nYPos,,
MouseMoverel>98,146
Wait>1
LClick
//select in reverse order
Wait>1
Press End
Press Shift
Press Home
Release Shift
Wait>1
//load audio
Press Enter
WaitWindowOpen>Adobe Audition - Untitled*
End>ReverseFiles
//ODD SIDES METADATA SUBROUTINE
SRT>OddSides
//Zoom out full horizontally
//This is the default hotkey for zoom out full horizontally in Audition
Send>\
//Zoom in two levels this is based on an expected side length of around 37mins which should then move the marker point back from the end by 13 frames
//This is the default hotkey in Audition for Zoom in horizontally
Send>=
Send>=
Wait>1
//Jump to end of file
Press End
Wait>1
//Backup slightly from the end to avoid the bug where Audition won't save CD Tracks
//MUST HAVE A HOTKEYs DEFINED IN AUDITION RR Start = Ctrl+Shift+R & RR Stop = Ctrl+Shift+x
Press Ctrl
Press Shift
send>r
Release shift
Release Ctrl
Wait>0.1
Press Ctrl
Press Shift
send>x
Release shift
Release Ctrl
//open marker list
Press Alt
Send>8
Release Alt
Wait>1
//Add Track Marker to end
Press F8
Wait>1
//Rename CD Marker
Press Tab*3
Wait>1
Send>CD Track 01
//Set Marker Type to Track
Press Tab*4
Press Down
Press Home
Press Down*2
Press Enter
Wait>1
//Add r to the description
Press Tab*7
Wait>1
Send>r
Press Enter
Wait>1
//delete first track
Press Tab
Press Home
Press Del
Wait>1
MouseMoveRel>430,119
LClick
Wait>1
//Go to the first marker
Press Home
//Add s to the description
Press Tab*7
Send>s
Press Enter
Wait>1
//Click in the marker window. Needed to ensure the marker window is closed properly and that the macro can continue safely.
MouseMoveRel>430,119
LClick
Wait>1
Press Alt
Send>8
Release ALT
End>OddSides
//EVEN SIDES METADATA SUBROUTINE
SRT>EvenSides
//Zoom out full horizontally
//This is the default hotkey for zoom out full horizontally in Audition
Send>\
//Zoom in two levels this is based on an expected side length of around 37mins which should then move the marker point back from the end by 13 frames
//This is the default hotkey in Audition for Zoom in horizontally
Send>=
Send>=
Wait>1
//Jump to end of file
Press End
Wait>1
//Backup slightly from the end to avoid the bug where Audition won't save CD Tracks
//MUST HAVE A HOTKEYs DEFINED IN AUDITION RR Start = Ctrl+Shift+R & RR Stop = Ctrl+Shift+x
Press Ctrl
Press Shift
send>r
Release shift
Release Ctrl
Wait>0.1
Press Ctrl
Press Shift
send>x
Release shift
Release Ctrl
//open marker list
Press Alt
Send>8
Release Alt
//Add Track Marker to end
Press F8
Wait>1
//Rename CD Marker
Press Tab*3
Wait>1
Send>CD Track 01
//Set marker Type to Track
Press Tab*4
Press Down
Press Home
Press Down*2
Press Enter
Wait>1
//Add r to the description
Press Tab*7
Send>r
Press Enter
Wait>1
//delete first track
Press Tab
Press Home
Press Del
Wait>1
MouseMoveRel>430,119
LClick
Wait>1
//Select 2nd from last marker
Press End
Press Up
//Add s to the description
Press Tab*7
Send>s
Press Enter
Wait>1
//Click in the marker window. Needed to ensure the window is closed properly and the macro can continue safely.
MouseMoveRel>430,119
LClick
Wait>1
Press Alt
Send>8
Release Alt
End>EvenSides
//SAVE FILE SUBROUTINE
SRT>SaveFile
//save the file
Press Ctrl
Press Shift
Send>s
Release Shift
Release Ctrl
WaitWindowOpen>Save As
//Check if save extra non-audio information check box is ticked
GetCheckBox>Save As,Save extra non-audio information,bChecked
If>bChecked=1
Goto>end
Else
SetCheckBox>Save As,Save extra non-audio information,TRUE
Label>end
//Set Save As Type to WAV
Press Alt
Send>t
Release Alt
Press Down
Press End
Press Up
Press Enter
Press Alt
Send>n
Release Alt
Wait>1
Send>%SaveDrive%\%ProdNumber%_%PubDate%_%ProducerName%_%PartNo%.wav
Wait>1
Press Enter
WaitWindowOpen>Adobe Audition - %ProdNumber%_%PubDate%_%ProducerName%_%PartNo%*
Wait>2
Press Alt
Send>fc
Press Enter
Release Alt
End>SaveFile