Can't Make "File" into Type File
Can't Make "File" into Type File
- Subject: Can't Make "File" into Type File
- From: Brian Cipresse <email@hidden>
- Date: Sat, 16 Feb 2008 21:45:17 -0800
Hi, I'm trying to create a folder action that takes the "Not Added.m3u" file created by the script List Music Folder Files Not Added and automatically ADDs (not import) them to the iTunes Library. I've got the ADD command working but I cannot hard code the file path/name. I can, however, use the "choose file with prompt" which works but isn't what I want.
The problem I'm having is identified below:
-- This method works, but I don't want to use it --set myFile to (choose file with prompt "Select a file to read:")
-- This method does NOT work, but I wish to use it set myFile to "ProDeuxHD:Users:Cippage:Music:NotAdded:Not Added.m3u"
--NOTE: I've tried to add of type {"TEXT"} here but get the error--Can’t get "ProDeuxHD:Users:Cippage:Music:NotAdded:Not Added.m3u" of type("TEXT"). Access not allowed. display dialog "Opening myFile for access..." open for access myFile
display dialog "setting myFileContents to read myFile..." set myFileContents to (read myFile)--NOTE: After pressing OK from the previous dialog, I get the following ErrorCan’t make "ProDeuxHD:Users:Cippage:Music:NotAdded:Not Added.m3u" into type file. display dialog "Closing myFile..." close access myFile
tell application "iTunes" to add myFile Does anyone know how to troubleshot this problem? When I google search on:
applescript "make into type file" I get only one web hit that doesn't open.
Thank you in advance for your time and consideration. -G4M |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden