Berend Jan Posted May 6, 2005 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
GaryFrost Posted May 6, 2005 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.
herewasplato Posted May 6, 2005 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]
Berend Jan Posted May 6, 2005 Author 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
herewasplato Posted May 6, 2005 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]
Berend Jan Posted May 6, 2005 Author 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
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