Sign in to follow this  
Followers 0
Berend Jan

Getting an error but don't know why

6 posts in this topic

Hi guys,

I'm getting this error when I'm running a script i made:

Posted Image

The problem is that i don't understand the problem or what is going wrong.

This is the script I was running:

Opt("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
EndIf

Could you guys explain me the problem?

Berend Jan

Share this post


Link to post
Share on other sites



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

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

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.

<{POST_SNAPBACK}>

omg stupid me :">

thx

Share this post


Link to post
Share on other sites

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

Func _CloseIE()
   While ProcessExists("iexplore.exe") = 1
      ProcessClose ("iexplore.exe")
      Sleep (5)
   WEnd
EndFunc

Will 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

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
Sign in to follow this  
Followers 0