AppleEvent timed out in iTunes, bug in iTunes?

I’ve got a script, loosely based on the freely available Audiobooker script that is supposed to help people import audiobook CDs into iTunes.

My script (and the original Audiobooker script) both have a problem when run within iTunes (at least on my machine), but run fine through the Script Editor.

After trying the following:

with timeout of 300000 seconds

When we tell iTunes to: convert the tracks of AudioPlaylist

Which imports the CD, it immediately times out with an AppleEvent timed out dialog. That happens if we run the script via the script menu in iTunes. If I run the script from the script editor, it works as expected.

Seems like the only explanation could be a bug in iTunes.
:frowning:

Any help is appreciated. This happened with the latest and previous versions of iTunes and with Mac OS X 10.8 and now 10.4.1.

Just out of curiousity, what happens if you set the timeout to something a lot lower?

Ok, I dropped it to 30 seconds, still immediately get the time out dialog in iTunes. :frowning:

For the record, I tried this:
– Import the tracks
with timeout of 30 seconds
convert the tracks of AudioPlaylist
end timeout

Couldn’t it be better Script Menu’s bug?
Read this, btw:
http://bbs.applescript.net/viewtopic.php?pid=39811#p39811
Perhaps you could try running thru FastScripts…

While I can run the script ok through Script Editor, but I want novice users to be able to run it to. I’m not using anything called “better Script Menu” or “FastScripts” Once you create a script folder in your iTunes directory, iTunes automatically adds a script menu to itself for running iTunes related scripts. That’s how I’m launching this within iTunes. I guess I could distribute this as a compiled script app. But I think users are used to using AppleScript from the AppleScript menu built into iTunes. :confused:

Yep… I’ve tested and it seems a bug in iTunes’s script-menu function…
The only workaround I can think about is checking periodically the status of “converted items” in ~/Music/iTunes… Something as:

--> pseudo-code
try
	with timeout of x seconds
		convert tracks of thePlaylist
	end
end

repeat
	if tracks_seem_converted then exit repeat
end

--> more things here...

Is there a way I can submit a bug to Apple and get a tracking number, etc. like a real developer? I’ve subscribed to ADC through their free ADC member offer, but since I don’t get paid to develop for Mac OS X I don’t have a paid subscription. :smiley:

I’m tired of being a wannabe Apple developer. I wanna be an Apple developer. :lol:

Check this :wink: :
http://developer.apple.com/bugreporter/