GodForsakenSoul Posted July 25, 2009 Share Posted July 25, 2009 i'm having a small issue with firefox portable here. behold, my script of death! HotKeySet("^{F9}", "killtheprocess") dim $ison=0 dim $loop=1 Run("firefox.exe", "D:\FirefoxPortable") Sleep(100) if ProcessExists("firefox.exe") Then $ison=1 EndIf While $loop=1 Sleep(100) WEnd Func killtheprocess() if $ison=1 Then ProcessClose("firefox.exe") Exit Else Exit EndIf EndFunc i make sure to check for any firefox.exe's running in my task manager before running this. it says that another firefox is already running, or running but not responding (it chooses them randomly, i think) and suggest i take a look to make sure it's dead. it's dead. very dead. why does it claim to have other instances, despite the fact i have none. i already did something like this once, except i forgot how Link to comment Share on other sites More sharing options...
somdcomputerguy Posted July 25, 2009 Share Posted July 25, 2009 In Task Manager, check under the 'Processes' tab to see if firefox is there. I've had a few situations where it is present there, but not under the 'Applications' tab. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
shawnmstout Posted July 25, 2009 Share Posted July 25, 2009 (edited) i'm having a small issue with firefox portable here. behold, my script of death! HotKeySet("^{F9}", "killtheprocess") dim $ison=0 dim $loop=1 Run("firefox.exe", "D:\FirefoxPortable") Sleep(100) if ProcessExists("firefox.exe") Then $ison=1 EndIf While $loop=1 Sleep(100) WEnd Func killtheprocess() if $ison=1 Then ProcessClose("firefox.exe") Exit Else Exit EndIf EndFunc i make sure to check for any firefox.exe's running in my task manager before running this. it says that another firefox is already running, or running but not responding (it chooses them randomly, i think) and suggest i take a look to make sure it's dead. it's dead. very dead. why does it claim to have other instances, despite the fact i have none. i already did something like this once, except i forgot how try this HotKeySet("^{F9}", "killtheprocess") dim $loop=1 Run("firefox.exe", "D:\FirefoxPortable") Sleep(100) if ProcessExists("firefox.exe") Then killtheprocess() EndIf While $loop=1 Sleep(100) WEnd Func killtheprocess() ProcessClose("firefox.exe") Exit EndFunc Edited July 25, 2009 by shawnmstout Link to comment Share on other sites More sharing options...
GodForsakenSoul Posted July 25, 2009 Author Share Posted July 25, 2009 thanks for the attempt, but it doesn't quite work. it kills all and any firefox.exe i'm trying to launch then exits. Link to comment Share on other sites More sharing options...
shawnmstout Posted July 25, 2009 Share Posted July 25, 2009 thanks for the attempt, but it doesn't quite work.it kills all and any firefox.exe i'm trying to launch then exits.i thought that is what you was wanting, so what are you wanting to do? Link to comment Share on other sites More sharing options...
GodForsakenSoul Posted July 25, 2009 Author Share Posted July 25, 2009 my firefox tends to freeze and i don't like going into the task manager because it takes a few good minutes for it to load some times. thus, the script checks to see if firefox.exe exists first, to see if its actually needed. then, upon confirmation of firefox exe it kills it. if not, just exit. why the hell doesn't it work?! Link to comment Share on other sites More sharing options...
shawnmstout Posted July 25, 2009 Share Posted July 25, 2009 (edited) i thought that is what you was wanting, so what are you wanting to do? Edited July 25, 2009 by shawnmstout Link to comment Share on other sites More sharing options...
shawnmstout Posted July 25, 2009 Share Posted July 25, 2009 right now your telling it to kill no matter what, you need to add a gui button to stop it, its not smart enough to tell if its frozen or not Link to comment Share on other sites More sharing options...
GodForsakenSoul Posted July 25, 2009 Author Share Posted July 25, 2009 no, no, you got it all wrong. i'm the one who tells it when FF is frozen. hence the hotkeyset. upon firefox freezing, i precc ctrl f9 and it kills firefox.exe. well, it's supposed to. Link to comment Share on other sites More sharing options...
Rarst Posted July 26, 2009 Share Posted July 26, 2009 Couldn't reproduce instance issue. One problem I see is too short pause after Run. Here is what I ended up with while tweaking it: HotKeySet("^{F9}", "killtheprocess") If Not ProcessExists("firefox.exe") Then Run("G:\_Firefox\FirefoxPortable.exe", "G:\_Firefox\") Else MsgBox(0,"","Firefox already running") Exit EndIf Do Sleep(100) Until ProcessExists("firefox.exe") While 1 Sleep(100) WEnd Func killtheprocess() ProcessClose("firefox.exe") Exit EndFunc By the way what's wrong with Alt+F4 to close FIrefox? >_< AutoIt tag at Rarst.net Link to comment Share on other sites More sharing options...
Danny35d Posted July 26, 2009 Share Posted July 26, 2009 Try it:HotKeySet("^{F9}", "killtheprocess") If Not ProcessExists("firefox.exe") Then Run("firefox.exe", "D:\FirefoxPortable") Else MsgBox(0,'',"Firefox already running") EndIf While ProcessExists('firefox.exe') Sleep(100) WEnd Func killtheprocess() While ProcessExists('firefox.exe') ProcessClose("firefox.exe") WEnd Exit EndFunc AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now