Jump to content

Recommended Posts

I am missing a concept or something. The below main line can sometimes take 20-30 seconds to close after I click on the X. I can see where the delay(500) would keep it from responding for half a

Readini()
$hTimer = TimerInit()
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    $NextCheck = ($CheckEvery * 1000) - TimerDiff($hTimer)
    ShowWait()
    If ($NextCheck > 0) Then
        Sleep(500)
        ContinueLoop
    EndIf
    $hTimer = TimerInit()
    CheckForFile()
    If $CopyResult = $Failed Then
        ContinueLoop
    EndIf
    ReadFile()
    If $ReadResult = $Failed Then
        ContinueLoop
    EndIf
WEnd

second but 20-30 seconds? What am I missing? (the functions take no time at all to execute):

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...