Trax Posted January 27, 2021 Share Posted January 27, 2021 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 comment Share on other sites More sharing options...
JockoDundee Posted January 27, 2021 Share Posted January 27, 2021 ShowWait(), CheckforFile() and ReadFile() are obvious candidates for inspection. Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
Developers Jos Posted January 27, 2021 Developers Share Posted January 27, 2021 change your gui to event mode and your issue should be gone. JockoDundee 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Trax Posted February 1, 2021 Author Share Posted February 1, 2021 Many thanks Link to comment Share on other sites More sharing options...
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