ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: Gracefully close Firefox on PC exit

<< < (2/8) > >>

skrommel:
 :) You can use CloseToQuit to close a list of apps, with options to close by using the process name, the class name or a part of a window caption.

To close FireFox just use apps=firefox.exe or apps=MozillaWindowClass.

Skrommel

Curt:
Many restarts later...:

Something is not all right, because I have not yet been able to make the script work.

Later on I also right-clicked the CloseToQuit.ahk > Compile Script, but when I db'clicked the new exe it said 'exe corrupted'. So something is wrong.

I better ask if this was the right formula: apps=firefox.exe
- no commas, brackets, or anything?

---
I have no idea what such a script should tell, but I am surprised that logonui.exe not is mentioned in the script, because I can see in my taskmanager that logonui is the one handling the XP shutdown. Please forgive me for even saying so.

Curt:
bumping...

... I have not yet been able to make the script work.-Curt (March 15, 2008, 08:01 PM)
--- End quote ---


Maybe I did something else wrong?
- maybe I need the idiot's guide on how to create and to use CloseToQuit ?
 :tellme:

nosh:
OK, _total_ AHK novice here but something really simple seems to work for me, the only caveat is you'll have to use it with Xecutor which will intercept the shutdown and run the "script":

IfWinExist,  ahk_class MozillaUIWindowClass
{
    WinActivate 
    Send {Alt}FX
    return
}

--- End quote ---

This will activate Firefox if it is running and close it through the menu system. I'm using FF 2.x, not sure what the class name would be if you're using v. 3.x. Try running the script manually to see if it closes FF, then restart. You can assign it as a shutdown command to Xecutor if all goes well. 
 

Edit: Xecutor is postcard-ware for non-commercial use.

Curt:
Thanks a lot, nosh!  :up:

Havent tried it yet, though, because I am on a big project, and just have taken up Avant...
but I need to ask if your typing was right - winexist - is it "-exist", not "-exit" or "-exits"?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version