making yur app quit when iTunes quits

hey just wondering if anyone has some code that would quit my program when iTunes is quit.

Hi hendo,

try this:

on idle theObject
	tell application "System Events"
		set iTunesRunning to (name of processes contains "iTunes")
	end tell
	if (not iTunesRunning) then
	end if
	return 1
end idle

doesn’t work:(

It does work (I have tried it). Are you sure your connection of the on idle handler is correct?

hmmm…actually i don’t even need the script…i’m somehow magically not getting an error now…odd…oh well thnx anywayz:D