Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Get Automator working again in iTunes 10' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Get Automator working again in iTunes 10
Authored by: loren_ryter on Sep 03, '10 10:41:17AM
Doug (and anyone else interested),

While this isn't a solution for automator, if you're using applescript, here's a routine I (and as WBC) have been using since iTunes 9 in anticipation of iTunesVersionGate10 aka iTunesVersionD-Day aka i10K:

tell application "iTunes"
	set vers to (version) as string
	set versbase10 to my create_base_10_version(vers)
	-- rest for testing result in script edtior
	set compare_string to "9.2.1"
	set compare_versbase10 to my create_base_10_version(compare_string)
	set result to {compare_string, compare_versbase10, vers, versbase10, (versbase10 > compare_versbase10)}
end tell

on create_base_10_version(version_string)
	(*
	this routine modified by wooden brain concepts, http://www.woodenbrain.com
	based on a routine originally written by an unknown scripter intended for use with DEVONthink
	it works equally well for iTunes
	it's still a bit of a hack but should work for any version string up to version "99.X.X.X"
	who thought these sort of version strings were a good idea in the first place??
	*)
	set pad_number to 9
	set oldDelim to AppleScript's text item delimiters
	set sys_delimiter to "."
	if version_string contains "," then set sys_delimiter to ","
	set AppleScript's text item delimiters to sys_delimiter
	set digit_list to every text item in version_string
	log digit_list
	set base_10 to 0
	repeat with this_digit in digit_list
		-- these lines need to be modified if version strings might end like "9.5beta1"; right now it would ignore the "beta1" part and go with "9.5" 
		if this_digit contains "beta" then set this_digit to (characters 1 through ((offset of "beta" in this_digit) - 1) of this_digit) as string
		if this_digit contains "pb" then set this_digit to (characters 1 through ((offset of "pb" in this_digit) - 1) of this_digit) as string
		set base_10 to (base_10 as number) * 100 + this_digit
	end repeat
	set base_10 to base_10 * (10 ^ (pad_number - (length of (base_10 as string))))
	if ((first item in digit_list as number) is greater than or equal to 10) then set base_10 to ("1" & base_10 as string)
	set AppleScript's text item delimiters to oldDelim
	return (base_10 as number)
end create_base_10_version


[ Reply to This | # ]
Get Automator working again in iTunes 10
Authored by: Jonathan David on Sep 03, '10 11:05:01AM

I guess I will have to wait for an Apple fix as I don't feel confident enough to mess with the innards.

I have found that CKs Text to Speech applications still work.



[ Reply to This | # ]
Get Automator working again in iTunes 10
Authored by: DizzyPenguin on Sep 06, '10 02:13:17AM
Wow, that looks like a major headache when (since Mac OS X 10.4) you could simply use a considering numeric strings statement.

tell application "iTunes"
	set vers to version as string
	set compare_string to "9.2.1"
	considering numeric strings
		set result to {compare_string, vers, (vers > compare_string)}
	end considering
end tell
---
Manage your iTunes Album Artwork > http://dizzypenguin.com/automac-it/


[ Reply to This | # ]