Any App: Quit

This quits the stated app. Useful for cleanup after Automator has left a mess of open apps it’s used. This scriptlet is for iPhoto. You can change the word iPhoto to iTunes, or whatever app you want to quit, provided the app has the Apple-H shortcut. Make sure your app name is in quotes.

--Quit App
tell app "iPhoto" to quit	
end tell

I am new into scripting though I am willing to learn.

I tried this script so all my dowloading apps would quit together ;

tell application "Azureus" to quit
tell application "Transmission" to quit
tell application "aMule" to quit
tell application "LimeWire" to quit

Unfortunately this doesn’t work. when I launch the script at a certain hour with iCal, I get a window saying that the script could not end proprely, and Transmission is still open while the rest did quit.

When I test it in AppleScript, or even when I just COMPILE it, Transmission actually opens !
But no, I want it to quit !

Could someone explain me why it acts this way ?

The only thing I thought of was the fact that Transmission is the only of the 4 to be directly inside the Applications folder and have a regular name (Azureus for example is considered as “JavaApplicationStub” in Activity Monitor) ; but I could be completely missing the point here.

Thanks in advance.

Seb

Model: iMac G5 PPC
AppleScript: 2.1.1
Browser: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.7) Gecko/20060911 Camino/1.0.3 (MultiLang)
Operating System: Mac OS X (10.4)

I’m not sure- a sort of new scripter myself, but whenever you have “tell” (or on, if, etc.) you also need an “End tell” (or on, if, etc.).

This should do it, although I cannot test or compile because I don’t have any of the apps:

tell application "Azureus" to quit
end tell
tell application "Transmission" to quit
end tell
tell application "aMule" to quit
end tell
tell application "LimeWire" to quit
end tell

However, I had thought that with one-liners such as

tell application "Transmission" to quit

rather than

tell application "Transmission" 
      quit

the end tell was not needed. Oh well, you learn something every day!
Please tell me if this worked, I would like to know.

Please excuse my profound ignorance…
I want to do exactly as this folder title lists, but is your code written for applescript or automater?

I only recently discovered that these script dealies are something I think I could use by watching an online video and seeing one in use.

What I want is to be able to click on the script or whatever and have both safari and mail shut down.
I’d also like to have one, or something running permanently, if possible, that every time I hit the close red x button of the window in preview, that it would also quit the app. since apple will not make that a preference option or even default like it is in iPhoto.

I know I’m only getting about 1/10th the use out of my mac that it is capable of because of my lack of knowledge of how stuff works. I tried to read apples help pages on applescript, and well i might as well have read them in chinese, because I have NO IDEA what anything said.
Thanks for any help offered, but a warning, it may lead to me asking for more clarification from you if it is not written for an uber-ignorant non tech type, so help me at your own risk.:lol::wink: