Jump to content

Recommended Posts

Posted (edited)

i have a problem with the script.. it keeps running over and over again until my laptop hangs.. whats wrong with the code?

While 1

If ProcessExists("iexplore.exe") Then

ShellExecute("C:\Program Files\Project1\Sticky Me 1.5.0.exe")

EndIf

Sleep(100)

WEnd

please help asap. thank you! i really need it for a project.

Edited by yabee
Posted (edited)

yabee your script didn`t exit loop. And If process named iexplore.exe exist it launches over and over again Sticky Me 1.5.0.exe .

As result it hangs your OS.

While 1
If ProcessExists("iexplore.exe") Then
Run("cmd.exe /c " & """" & @ProgramFilesDir&"\Project1\Sticky Me 1.5.0.exe" & """",@ScriptDir,@SW_HIDE)
Exit
EndIf
Sleep(100)
WEnd

edit:My bad English :idea:

Edited by Sh3llC043r
[size="5"] [/size]
Posted

you have another thread at http://www.autoitscript.com/forum/index.php?showtopic=113421&st=0 which i have replied to which should answer your problem =)

Posted

While 1
    If ProcessExists("iexplore.exe") Then
        ShellExecute("C:\Program Files\Project1\Sticky Me 1.5.0.exe")
    EndIf
    Sleep(100)
WEnd

I added autoit tags [ autoit ] ... [ /autoit ] to your quote (remove spaces in tags displayed in this line to use). You just need a minor addition to the code and it will perform good.

While 1
    ; added:  And Not ProcessExists("Sticky Me 1.5.0.exe")
    If ProcessExists("iexplore.exe") And Not ProcessExists("Sticky Me 1.5.0.exe") Then
        ShellExecute("C:\Program Files\Project1\Sticky Me 1.5.0.exe")
    EndIf
    Sleep(100)
WEnd

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...