• 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
Assigning attributes to files in iTunes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Assigning attributes to files in iTunes


  • Subject: Assigning attributes to files in iTunes
  • From: Richard Darenberg <email@hidden>
  • Date: Thu, 6 Dec 2007 13:15:06 -0700

Hi,

I've got drop box that automatically loads files into iTunes. This has been working for quite a while.
What I would like to do now is assign eq presets and set the bookmarkable option on files that are uploaded.
What I've got works when I walk through the code, but doesn't work when I turn debugging off (Script Debugger).


Here's the old code:

	tell application "iTunes"
		if my_files is {} then
			-- do nothing empty set
		else
			repeat with loopVar from 1 to number of items in my_files
				set this_file to (item loopVar of my_files)
			        add this_file
			end repeat
		end if
	end tell

Here's the new code:

	tell application "iTunes"
		if my_files is {} then
			-- do nothing empty set
		else
			repeat with loopVar from 1 to number of items in my_files
				set this_file to (item loopVar of my_files)
				set thisTrack to (add this_file)
                                -- get the name was only used for debug
				get the name of thisTrack
				set EQ of thisTrack to "Spoken Word"
				set bookmarkable of thisTrack to true
			end repeat
		end if
	end tell

As I said this is not working with debug turned off. I'm running Leopard, 10.5.1.
Any help on fixing this would be greatly appreciated.


thanks,

Rick Darenberg
----------------
The most insightful part of the Windows OS Start menu is making "Shutdown" the first option.


_______________________________________________
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
  • Prev by Date: Re: Problem with reading 4-byte floats from file on Intel
  • Next by Date: Folder Action script runs on file renaming
  • Previous by thread: Re: Smile (Was: AppleScript4programmers)
  • Next by thread: Folder Action script runs on file renaming
  • Index(es):
    • Date
    • Thread