Make the application quit

How can I force the application to quit? I have tried this:


tell application "IRSender" to quit

but nothing happens. No error, but the application doesn’t quit either. IRSender is the application itself - I want it to quit itself under a certain condition.

I’ve tried searching and looking in the AppleScript dictionary but I can’t find what I need.

Thanks
Mark

Just issue a “quit” command. The script knows that you want “me” to quit, so you don’t need to explicitly tell it to quit itself. For example…

on clicked theObject
	if name of theObject is "quitButton" then
		quit
	end if
end clicked

j

Thanks jobu. The problem was that I was doing this:


tell application "Finder"
    if (not (exists process "EyeTV")) then
        quit
    end if
end tell

but thinking about it, this is telling the Finder to quit. I have modified my code as follows:


tell application "Finder"
    if (not (exists process "EyeTV")) then
        set wanttoquit to true
    end if
end tell
if wanttoquit is true then quit

What about something like this?

tell application "Finder" to get (not (exists process "EyeTV"))
if result is true then quit