Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
I am new to Applescript. I am trying to write a script to record an audio file and save it to a different script bundle – “PlayPro.scptd” – with the name passed to the script from an Excel file. The path – savePath – seems to be correct but it doesn’t work as I expect. Here is my script:
on RecordM4a(RecordName) tell application "Finder" set r to POSIX path of ((container of (path to me) as text)) set r2 to "PlayPro/Contents/Resources/AudioFiles/" set savePath to r & r2 & RecordName display dialog savePath tell application "QuickTime Player" activate set doku to new audio recording start doku delay 4 stop doku set newDoc to last item of (documents whose name contains "Untitled") export newDoc in file savePath using settings preset "Audio Only" close newDoc saving no end tell end tell tell application "QuickTime Player" if it is running then quit end if end tell end RecordM4a