Jump to content
  1. FrancescoDiMuro


  2. Tersion


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Tersion
      Here simple script:
      #include <InetConstants.au3> Local $hDownload $hDownload = InetGet("http://www.autoitscript.com/autoit3/files/beta/update.dat", @ScriptDir & "\test.txt", $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND) ConsoleWrite(@error) Sleep(5000) $bReturn = InetClose($hDownload) MsgBox(0, "", $bReturn) The reference says:
      Return Value True: if the handle was found and closed. False: if not. But I get always: False? I guess there should be True... Why that? Something wrong? Downloaded text file open as normal. @error = 0
    • By Blueman
      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
    • By rudi
      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.
    • By JonBMN
      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
    • By uncommon
      I know InetClose closes the "resources" to make sure it does not leak as the help file says but what kind of resources are we talking about? My reason for asking is I may need to run a script the fires the Inetget a few times and does not wait for the download to finish in a loop. If I use InetClose then it will kill the downloads in progress, so I want to know the consequence of leaving several of theses resources open.
  • Create New...