I am trying to run a perl script from within applescript. The command works fine from a Terminal but generates an error within Applescript. It seems to be to do with applescript quoting some of the params when it passes them to the perl script. However, I’m new to perl and Applescript so I could be completely wrong. I would appreciate anyone who can help break out of my stupidity!
I am tearing my hair out trying to get this to work trying various combinations of escaped characters, different shells, different quotes (quoted form of, etc) but I can’t work out what the basic problem is.
Kind Regards,
Kefa.
APPLESCRIPT COMMAND (THAT DOESN’T WORK)
do shell script (“/Users/dan/Library/Scripts/flac2mp3/flac2mp3.pl ‘/Users/dan/Music/Squeezebox Music/Originals’ ‘/Users/dan/Music/iTunes/iTunes Music/Transcoded Music’”)
APPLESCRIPT ERROR MESSAGE (NOTE ALL THE ESCAPED CHARS)
“Processing directory: /Users/dan/Music/Squeezebox Music/Originals
5549 flac files found. Sorting…done.
Processing "bent/Later (Compiled & Mixed By Bent/01. Eastern Lights (Neon Heights Mix) .flac"
Processing "joni mitchell/hejira/09. refuge of the roads.flac"
flac --decode --stdout --silent "joni mitchell/hejira/09. refuge of the roads.flac"| lame --preset standard --replaygain-accurate --quiet - "/Users/dan/Music/iTunes/iTunes Music/Transcoded Music/joni mitchell/hejira/09. refuge of the roads.mp3" failed with exit code 32512”
TERMINAL COMMAND (WORKS FINE)
/Users/dan/Library/Scripts/flac2mp3/flac2mp3.pl ‘/Users/dan/Music/Squeezebox Music/Originals’ ‘/Users/dan/Music/iTunes/iTunes Music/Transcoded Music’