Cant open a file with Applescript

Joined
Sep 14, 2023
Messages
1
Reaction score
0
--This does not open the ".cpr" file
tell application "Finder"

--copy foler
set x to "Macintosh HD:Users:shawnbrady:Dropbox:Audio:Features:"
copy folder "Macintosh HD:Users:shawnbrady:Desktop:Features:" to folder x
delay 1

--rename folder and file
set y to every item of window 1 whose name contains "omf"
set omf_name to name of item 1 in y as string
set file_name to characters 1 thru -5 of omf_name as string
set folder_name to characters 1 thru -3 of file_name as string
set name of file "Macintosh HD:Users:shawnbrady:Dropbox:Audio:Features:Features:FEAT.cpr" to file_name & ".cpr"
set name of folder "Macintosh HD:Users:shawnbrady:Dropbox:Audio:Features:Features" to folder_name & "NPR"
delay 1



-- open file DOES NOT WORK
set xx to every folder of window 1 as string
set yy to (every item of folder xx whose name contains ".cpr") as string
delay 1
open file yy


end tell
 

Cory Cooper

Moderator
Joined
May 19, 2004
Messages
11,102
Reaction score
496
Hello and welcome.

I am not very experienced with AppleScript/Automator.

It looks like you are working with some audio files - .omf and .cpr. Do the files open in the proper DAW without using the script? Are you try to convert them?

C
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top