Search the Community
Showing results for tags 'hang'.
-
Here test example: The code is not prefect, but it's demonstrates the problem. So, when I download more than 2 files simultaneous from one server (in my example I download 3 simultaneously) by InetGet() with background option, I will get only 2 active downloads. It's seems like server limitation. The third will remain with 0 read bytes until one of the previous downloads would finished. And if I want to close this third 0 bytes read download with InetClose() I will get hang of Window GUI for several seconds! After that, the third download would be closed and everything will continue to work normally. If I InetClose() one of the active downloads with more than 0 bites read - all works fine! You can try by your self given example, or watch this .gif's: 1. Window GUI hangs when I trying to Cancel (InetClose()) download with 0 bytes read download: 2. All works as it should, when I Cancel more than 0 bytes read download: Any ideas why is it happens?
-
Hi all, I was wondering if you can help me with the function called; InetRead(). My scripts are using this function a lot for several conditions and everything works fine! But sometimes when the server is a little bit buggy of simply not available my script is hanging. It takes about 90sec before this function returns a Timeout, when i adjust the parameter it still is hanging about 90sec. The following script is a example where the script is hanging for aprox. 90sec; ; Set Timeout to 2sec AutoItSetOption ("TCPTimeout", 2000) ; Read Website InetRead("http://www.geenverbinding.nl/",1) ; Show Msgbox before Ending Script. Msgbox(64,"","Finished") The following script is a example where the script show the Msgbox pretty fast; ; Set Timeout to 2sec AutoItSetOption ("TCPTimeout", 2000) ; Read Website InetRead("http://www.google.nl/",1) ; Show Msgbox before Ending Script. Msgbox(64,"","Finished") My question now is, what am i doing wrong and/or is there a other way to prevent Hanging the script? Thanks all
-
Hi, any suggestion to track down, why a script is freezing after a longer run time? This is a general question, I've checked the common mistakes, I've made so far (inside a loop doing fileopen() without fileclose(), runwait() for progs, that don't terminate, infinite recursive loops etc.) This script stops just after several days of running... Is there a direct way to "count" the amount of MEM and handles, a autoit script is using itself, or by child processes? Regards, Rudi.
-
Just trying to use a simple While loop to watch for input in a GUI window, but when I go to run it and then give the input. It seems to completely hang and I must at that point stop it manually and restart. I know I'm missing something (could be trivial), but a push would be greatly appreciated. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiButton.au3> #include <EditConstants.au3> #include <MsgBoxConstants.au3> Local $F1Button, $F1Key HotKeySet("{Esc}", "Quit") $F1Key = HotKeySet("{F1}", "UnlockCar") GUI() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_Event_Close Quit() Case $msg = $F1Button UnlockMe() EndSelect WEnd Func GUI() $DisclaimerHandle = GUICreate("Disclaimer", 525, 245, -1, -1, -1, $WS_EX_TOPMOST) ;Creates the GUI window GUICtrlCreateLabel("example", 7, 15) GUICtrlCreateLabel("", 7, 30) GUICtrlCreateLabel("example", 7, 45) GUICtrlCreateLabel(" example", 7, 60) GUICtrlCreateLabel("", 7, 75) GUICtrlCreateLabel("example", 7, 90) GUICtrlCreateLabel("example", 7, 105) GUICtrlCreateLabel("example", 7, 135) GUICtrlCreateLabel("example", 7, 165) GUICtrlCreateLabel("if using a touchscreen press the F1 button below.", 7, 180) $F1Button = GUICtrlCreateButton("F1", 217, 205, 50, 30) GUISetState(@SW_SHOW) ;Shows the GUI window EndFunc ;==>GUI Func UnlockMe() MsgBox(0, "I work", "I work") Quit() EndFunc ;==>UnlockMe Func Quit() GUIDelete() Exit EndFunc ;==>Quit
-
Hi, I'm writing a script to copy a number of files from UNC paths. That bit is pretty simple. However, my users think my script has crashed, which it hasn't, it's only because the UNC path doesn't exist and one of the AutoIt functions is waiting. This is true of FileExists(), FileCopy(), DriveStatus(), etc. Is there a function to check if a UNC path exists that doesn't pause in this fashion? The only way round it, that I can think of at the moment, is to spawn another process and pre-check all the UNC paths and write if they exist in a text file. Then rather than use FileExists(), I use my text file instead. Anybody got a better idea? Thanks, James