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


Click here to return to the 'a suggestion...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
a suggestion...
Authored by: airdrummer on Mar 08, '07 08:31:25AM
i think you are trying to extract the artist name from the pathname, but you are doing it the hard way, inspecting the string character-by-character, looking for ":".
applescript does have some features that make it easy...replace this code:
	set m to ((count of pathQ) - 1)
	set pathQ to characters 1 through m of pathQ as string
	set x to m
	--artist name getting loop
	repeat
		set z to x
		set char1 to character x of pathQ
		if char1 is ":" then
			exit repeat
			end if
	        set x to x - 1
	end repeat
	set artistQ to characters (z + 1) through m of pathQ as string
with this:
	set AppleScript's text item delimiters to {":"}
	set artistQ to last text item of pathQ
	set AppleScript's text item delimiters to {""}
and see if it doesn't run faster;-)

[ Reply to This | # ]
oops...
Authored by: airdrummer on Mar 08, '07 08:36:19AM
forgot to trim the trailing colon:
    	set artistQ to text item -2 of pathQ


[ Reply to This | # ]