Berend Jan 0 Posted May 6, 2005 Hi guys,I'm getting this error when I'm running a script i made: The problem is that i don't understand the problem or what is going wrong.This is the script I was running:expandcollapse popupOpt("TrayIconDebug", 1) ;=================================================================================================== ========================================================= Func _CloseIE() $Process = ProcessExists("iexplore.exe") If $Process = 0 Then Exit Else _CloseIE() EndIf EndFunc Func _PCaan() $Minutes = InputBox ( "Afsluiten script", "Na hoeveel minuten wil je dat je scripts worden afgesloten? Voer alleen numerieke karakters in!", "42", " M3", -1, 150) $Result = $Minutes * 60000 If @error = 1 Then Exit Sleep($Result) _CloseIE() EndFunc FUnc _PCuit() $Minutes = InputBox ( "Afsluiten script", "Na hoeveel minuten wil je dat je scripts worden afgesloten? Voer alleen numerieke karakters in!", "42", " M3", -1, 150) $Result = $Minutes * 60000 If @error = 1 Then Exit Sleep ($Result) Shutdown(9) EndFunc Func _Minutes() EndFunc ;=================================================================================================== ========================================================= $AanUit = MsgBox (3, "Scripts afsluiten", "Wil je alleen de scripts afsluiten en de pc aan laten? Klik dan 'Ja'. Wil je de pc afsluiten na het scripten, klik dan 'Nee'. Klik 'Cancel' voor annuleren.") If $AanUit = 6 Then _PCaan() ElseIf $AanUit = 7 Then _PCUit() Else Exit EndIfCould you guys explain me the problem?Berend Jan Share this post Link to post Share on other sites
GaryFrost 18 Posted May 6, 2005 Func _CloseIE() $Process = ProcessExists("iexplore.exe") If $Process = 0 Then Exit Else _CloseIE() EndIf EndFunc keeps calling itself if iexplore.exe process exists it's not closing ie it's just checking if it is running and calling itself over and over. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Share this post Link to post Share on other sites
herewasplato 2 Posted May 6, 2005 Func _CloseIE() $Process = ProcessExists("iexplore.exe") If $Process = 0 Then Exit Else _CloseIE() EndIf EndFunc If IE is there, then this function seems to just call itself over and over... never does anything to close/kill IE... or am I missing something? [size="1"][font="Arial"].[u].[/u][/font][/size] Share this post Link to post Share on other sites
Berend Jan 0 Posted May 6, 2005 Func _CloseIE() $Process = ProcessExists("iexplore.exe") If $Process = 0 Then Exit Else _CloseIE() EndIf EndFunckeeps calling itself if iexplore.exe process existsit's not closing ie it's just checking if it is running and calling itself over and over.<{POST_SNAPBACK}>omg stupid me :"> thx Share this post Link to post Share on other sites
herewasplato 2 Posted May 6, 2005 Func _CloseIE() While ProcessExists("iexplore.exe") = 1 ProcessClose ("iexplore.exe") Sleep (5) WEnd EndFunc Will this work for you? [size="1"][font="Arial"].[u].[/u][/font][/size] Share this post Link to post Share on other sites
Berend Jan 0 Posted May 6, 2005 Func _CloseIE() While ProcessExists("iexplore.exe") = 1 ProcessClose ("iexplore.exe") Sleep (5) WEnd EndFuncWill this work for you?<{POST_SNAPBACK}>already adapted it to this:unc _CloseIE() ProcessClose("IExplore.exe") Sleep(1000) $Process = ProcessExists("iexplore.exe") If $Process = 0 Then Exit Else _CloseIE() EndIf EndFunc Share this post Link to post Share on other sites