Sign in to follow this  
Followers 0
GodForsakenSoul

another instance is already running

11 posts in this topic

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 :)

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by shawnmstout

Share this post


Link to post
Share on other sites

thanks for the attempt, but it doesn't quite work.

it kills all and any firefox.exe i'm trying to launch then exits.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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?!

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

i thought that is what you was wanting, so what are you wanting to do?

Edited by shawnmstout

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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? >_<

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0