yabee Posted April 22, 2010 Posted April 22, 2010 (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 April 22, 2010 by yabee
somdcomputerguy Posted April 22, 2010 Posted April 22, 2010 You've got the body of the script running within a While...WEnd loop. 1 will always equal 1, so... - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
Fire Posted April 22, 2010 Posted April 22, 2010 (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) WEndedit:My bad English Edited April 22, 2010 by Sh3llC043r [size="5"] [/size]
yabee Posted April 22, 2010 Author Posted April 22, 2010 thank you so much guys. the script works well ^^
omnomnom Posted April 22, 2010 Posted April 22, 2010 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 =)
MHz Posted April 23, 2010 Posted April 23, 2010 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
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