yabee 0 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 Share this post Link to post Share on other sites
somdcomputerguy 103 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. Share this post Link to post Share on other sites
Fire 3 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] Share this post Link to post Share on other sites
yabee 0 Posted April 22, 2010 thank you so much guys. the script works well ^^ Share this post Link to post Share on other sites
omnomnom 0 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 =) Share this post Link to post Share on other sites
MHz 80 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 Share this post Link to post Share on other sites