Ahh I think there is a problem
This is the start of the script
Code: Select all
//Ask if the magazine has multiple parts
Input>TotalParts,How Many Parts Does This Magazine Have?,1
//Single Part
If>TotalParts=1
Let>INPUT_BROWSE=2
Input>AudioFolder,Please select the folder containing the audio files you wish to append.,
If>AudioFolder=""
Exit>0
EndIF
Let>PartNo=1
ELSE
//Multiple Parts
Let>PartNo=TotalParts
Let>NumTimes=TotalParts+1
Let>loop=1
Repeat>loop
Let>INPUT_BROWSE=2
Input>AFLoop,Please select the folder containing the files for Part %loop%.,
Let>AudioFolder%loop%=AFLoop
If>AFLoop=""
Exit>0
EndIF
Let>Loop=Loop+1
Until>loop=NumTimes
ENDIF
//Continue with rest of data gathering
But then later I have this:
Code: Select all
//Locate to File Name Field
Press Alt
Send>n
Release Alt
Wait>1
IF>TotalParts=1
Send>%AudioFolder%
Else
Send>AudioFolder%loop%
EndIF
This bit needs to enter the full path of the folder containing the files for each part. So if there are two parts then, for part 1 it enters the path for the folder containing the files for Part 1 on the first pass and then enters the path for part 2 on the second pass.
It will probably help to explain what the macro does in full.
I need to join several files together in Adobe Audition and drop in markers and metadata and then save the result as a new file which is for an audio magazine. However sometimes the magazine will be in 1 part and other times it will be in 2, 3 or more parts. When there are multiple parts each new file needs to be created individually but odd numbered parts have have different metadata to even numbered parts.
So the basic overview is:
Collect information about the magazine
If there are more than 1 part, collect the paths to the files for both parts
Load files for the first part into Audition and join them together
Add relevant metadata depending on whether it is an odd or even part number
Save the file to a specified location
If there is more than one part, repeat the process but this time load files for part 2, 3 etc
This is my full code at the moment (a work in progress), I had this all working for single parts but now am trying to get it to automate multiple parts so some of the code towards the end hasn't been changed yet:
Code: Select all
//Ask if the magazine has multiple parts
Input>TotalParts,How Many Parts Does This Magazine Have?,1
//Single Part
If>TotalParts=1
Let>INPUT_BROWSE=2
Input>AudioFolder,Please select the folder containing the audio files you wish to append.,
If>AudioFolder=""
Exit>0
EndIF
Let>PartNo=1
ELSE
//Multiple Parts
Let>PartNo=TotalParts
Let>NumTimes=TotalParts+1
Let>loop=1
Repeat>loop
Let>INPUT_BROWSE=2
Input>AFLoop,Please select the folder containing the files for Part %loop%.,
Let>AudioFolder%loop%=AFLoop
If>AFLoop=""
Exit>0
EndIF
Let>Loop=Loop+1
Until>loop=NumTimes
ENDIF
//Continue with rest of data gathering
Input>ProdNumber,Please Enter The Production Number?,150
If>ProdNumber=""
Exit>0
EndIF
Input>PubDate,Please Enter The Publication Date As YYMMDD?,
If>PubDate=""
Exit>0
EndIF
Input>ProducerName,Please Enter The Initials of The Audio Producer,
If>ProducerName=""
Exit>0
EndIF
Input>SaveDrive,Please Select Where You Want The File Saved,
If>SaveDrive=""
Exit>0
EndIF
//Works out if the number of parts are odd or even
Let>x={%PartNo% mod 2}
SetFocus>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
//Locate to File Name Field
Press Alt
Send>n
Release Alt
Wait>1
IF>TotalParts=1
Send>%AudioFolder%
Else
Send>AudioFolder%loop%
EndIF
Wait>1
Press Enter
Wait>3
Press Shift
Press Tab*2
Release Shift
//select in reverse order
Wait>1
Press End
Press Shift
Press Home
Release Shift
Wait>1
//load audio
Press Enter
WaitWindowOpen>Adobe Audition - Untitled*
//This is where it needs to work out if it is an odd or even part number
IF>x=0
//For Even Parts
//Add CD Track
Press End
//open marker list
Press Alt
Send>8
Release Alt
Wait>1
MouseMoveRel>430,119
LClick
Press Tab
Press Right*2
Press Enter
Press Tab
Send>CD Track 01
Press Tab*4
Press Down
Press Home
Press Down*2
Press Enter
Press Tab*7
Send>r
Press Enter
//delete first track
Press Tab
Press Home
Press Tab
Press Right
Press Enter
Wait>1
MouseMoveRel>430,119
LClick
Wait>1
Press End
Press Up
Press Tab*7
Send>s
Press Enter
Wait>1
Press Alt
Send>8
ELSE
//For Odd Numbered Parts
//Add CD Track
Press End
//open marker list
Press Alt
Send>8
Release Alt
Wait>1
MouseMoveRel>430,119
LClick
Press Tab
Press Right*2
Press Enter
Press Tab
Send>CD Track 01
Press Tab*4
Press Down
Press Home
Press Down*2
Press Enter
Press Tab*7
Send>r
Press Enter
//delete first track
Press Tab
Press Home
Press Tab
Press Right
Press Enter
Wait>1
MouseMoveRel>430,119
LClick
Wait>1
Press Home
Press Tab*7
Send>s
Press Enter
Wait>1
Press Alt
Send>8
ENDIF
//save the file
Release Alt
Press Alt
Send>f
Release Alt
Send>e
Wait>2
Press Tab*5
Wait>1
Send>%SaveDrive%\%ProdNumber%_%PubDate%_%ProducerName%_%Part_No%.wav
Press Enter