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

(1/8) > >>

Curt:
I will almost "always" forget to close Firefox before I close my XP, so at the next boot it will ask if I want to restore session or not. I find this annoying, because I have Firefox placed in Start > Minimized   for the very reason that I do not want to see it before I need to use it.


IDEA: an app' that will use every XP shutdown / reboot to...
- immediately but gracefully auto-close any Firefox before it is terminated by force!

Please?  :tellme:

I use various programs to shut down XP.

Edited:
Windows will in general close most of the programs in the very same order in which they were started, and because my starting point of Firefox is delayed, so the closing of Firefox will also be delayed, giving enough time for some spy to react and gently close the fox - I would guess.

nosh:
Nice idea. A simple Autohotkey script that closes FF (through its menu system), used in conjunction with something like Xecutor should suffice.

AndyM:
I see in the Tab Mix Plus configuration dialog box there are two yes/no options:  "Use Firefox's built-in Session Restore feature" and "Enable Session Manager" (Tab-Mix's version).

I wonder if unchecking both boxes would stop the unwanted message on restart (if disabling the whole feature was an acceptable trade-off).

For that matter, if Tab Mix Plus can disable the Session remembering, it probably could be disabled via a change in Firefox's about:config settings. Maybe there's even a setting to keep the feature and just disable the "do you want to restore?" dialog.

skrommel:
 :) Try CloseToQuit - Close programs before the system shuts down!

Usage: Add the process name, class or a part of the caption of the programs
you want to close to the apps= line. Separate them by commas.
Any spaces or tabs around the delimiting commas are significant,
meaning that they are part of the match string!

Syntax:  apps=[<process name>,<class>,<part of a caption>]

Example: apps=calc.exe,MozillaWindowClass,- Notepad

Skrommel



--- ---;CloseToQuit.ahk
;  Close programs before the system shuts down
;  Usage: Add the process name, class or a part of the caption of the programs
;         you want to close to the apps= line. Separate them by commas.
;         Any spaces or tabs around the delimiting commas are significant,
;         meaning that they are part of the match string!
;  Syntax:  apps=[<process name>,<class>,<part of a caption>]
;  Example: apps=calc.exe,MozillaWindowClass,- Notepad
;Skrommel @ 2008


#NoEnv
#SingleInstance,Force
DetectHiddenWindows,On
SetWinDelay,0
SetBatchLines,-1


apps=calc.exe,MozillaWindowClass,- Notepad


DllCall("kernel32.dll\SetProcessShutdownParameters",UInt,0x4FF,UInt,0)
OnMessage(0x11,"WM_QUERYENDSESSION")
Return


WM_QUERYENDSESSION(wParam,lParam)
{
  Global apps

  Gui,+LastFound
  self:=WinExist()
  WinGet,ids,List,,,Program Manager
  Loop,%ids%
  {
    id:=ids%A_Index%
    If id=%self%
      Continue
    WinGet,process,ProcessName,ahk_id %id%
    WinGetClass,class,ahk_id %id%
    WinGetTitle,title,ahk_id %id%
    If process In %apps%
      WinClose,ahk_id %id%
    Else
    If class In %apps%
      WinClose,ahk_id %id%
    Else
    If title Contains %apps%
      WinClose,ahk_id %id%
  }
  ExitApp
}

Curt:
Thanks, AndyM, but restoring sessions can sometimes be important to me, so I don't think I would want to un-check this option. I would rather go for the script nosh is talking about. Only, I have idea how to do something like that myself (and I will not purchase $15 Xecutor) - but I do have AutoHotkey installed.

- So I am still requesting some help on this idea, please.

Warning - while you were typing a new reply has been posted.
--- End quote ---

... studying skrommel's answer...

Syntax:  apps=[<process name>,<class>,<part of a caption>]
Example: apps=calc.exe,MozillaWindowClass,- Notepad -skrommel (March 15, 2008, 01:30 PM)
--- End quote ---

Hmm... I got confused because of the example's content. In my case I expect the program's name must be firefox.exe , but should I also type MozillaWindowClass? And what about the third info, 'part of a caption' - what is that in this connection with firefox? Forgive me for asking such childish questions, but I really mean this thing under Homer van Gogh about me being an IT-analphabetic...

Will someone please  make the example talk about Firefox only?  :tellme:

Other than me knowing nothing I am most grateful for skrommel offering a solution, and for responding so fast.  :up:

Navigation

[0] Message Index

[#] Next page

Go to full version