I'm trying to write an applescript that get's the filepath of a .mp3 file in iTunes and shows the corresponding .als file (with the same name) in a folder name ALS in my itunes folder.
This is what i have so far:
I get this error message:
Finder got an error: Cant make ":Users:nichola:Music:iTunes:ALS:02 049-Eric Prydz - 2night (Original Mix)_PN.als" into type item.
For some reason: it doesn't successfully reveal the file in finder, I have made sure this file exists in the path it specifies, also i have tried making a new patch with
and get the same error message.
I am new to applescript, can somebody tell me what is wrong?
Thankyou!
This is what i have so far:
Code:
tell application "iTunes"
activate
set fileName to {location} of selection of front browser window as string
set TID to AppleScript's text item delimiters
set AppleScript's text item delimiters to ":"
set pieces to text items of fileName
set fileName to last text item of fileName
set fileName to text 1 thru -5 of fileName
set AppleScript's text item delimiters to TID
set fileName to fileName & ".als"
set fileName to ":Users:nichola:Music:iTunes:ALS:" & fileName
end tell
tell application "Finder"
activate
reveal fileName
end tell
I get this error message:
Finder got an error: Cant make ":Users:nichola:Music:iTunes:ALS:02 049-Eric Prydz - 2night (Original Mix)_PN.als" into type item.
For some reason: it doesn't successfully reveal the file in finder, I have made sure this file exists in the path it specifies, also i have tried making a new patch with
Code:
tell application "Finder"
reveal "(I have dragged the file from folder ALS here)"
end tell
and get the same error message.
I am new to applescript, can somebody tell me what is wrong?
Thankyou!
Last edited by a moderator: