use csv to populate apple script variables

I am dabbling in Apple Script and I want to use a csv file to populate variables to my apple script that I can use to create an app in Automator. Can someone show me how? This is what my csv contains: L R C LFE Ls Rs and I want these variables to replace <$> in the apple script. Is this possible?


for f in "$@"

do

/Applications/Compressor.app/Contents/MacOS/Compressor -jobpath $f -relabelaudiotracks <$> -renametrackswithlayouts


done

Posted on Oct 30, 2025 9:37 AM

Reply
2 replies

Oct 30, 2025 9:50 AM in response to BRocker800

Use:


set the_strings to "L R C LFE Ls Rs"

set output_string to ""

repeat with this_string in words of the_strings

"for f in \"$@\"" & return & "do" & return & tab & "/Applications/Compressor.app/Contents/MacOS/Compressor -jobpath $f -relabelaudiotracks " & this_string & " -renametrackswithlayouts" & return & "done"

--Put code which processes the results here. If you just want them displayed, use set output_string to output_string & the result & return & return

end repeat


(261758)

use csv to populate apple script variables

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.