• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't Make "File" into Type File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't Make "File" into Type File


  • Subject: Re: Can't Make "File" into Type File
  • From: EBI Aktivitet <email@hidden>
  • Date: Sun, 17 Feb 2008 08:05:08 +0100
  • Thread-topic: Can't Make "File" into Type File

Title: Re: Can't Make "File" into Type File
Try changing the line

set myFile to “ProDeuxHD:Users:Cippage:Music:NotAdded:Not Added.m3u"

To

set myFile to alias "ProDeuxHD:Users:Cippage:Music:NotAdded:Not Added.m3u"

Or to

set myFile to file "ProDeuxHD:Users:Cippage:Music:NotAdded:Not Added.m3u"


Regards, Adim



--
Adim Lundin
EBI AB
Måsungevägen 19
SE-131 50 Saltsjö-Duvnäs
SWEDEN
email@hidden
www.ebi.se
Tel:+46(0)8-899002
Mobile:+46(0)707201224


Den 08-02-17 06.45, skrev "Brian Cipresse" <email@hidden>:

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 <http://dougscripts.com/itunes/scripts/scripts07.php?page=1#listnotadded>  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 Error
Can’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

 _______________________________________________
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

References: 
 >Can't Make "File" into Type File (From: Brian Cipresse <email@hidden>)

  • Prev by Date: Can't Make "File" into Type File
  • Next by Date: Re: Can't Make "File" into Type File
  • Previous by thread: Can't Make "File" into Type File
  • Next by thread: Re: Can't Make "File" into Type File
  • Index(es):
    • Date
    • Thread