Jump to content
  1. argumentum

    argumentum

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By HansHenrik
      ----------
      edit: this is probably in the wrong place, can a moderator move it to wherever it belongs?
      ----------

      is there any way to completely disable TCPTimeout and make TCPRecv() wait indefinitely? maybe setting it to 0 or -1 or something? 
      the docs doesn't seem to mention any way to disable it

      - the underlying C code would set SO_RCVTIMEO to 0 , aka

      DWORD timeout=0;
      setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout));
    • 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 ur
      I have automated an install process by using the below code.
       
      Func _WinWaitActivate($title,$text,$timeout=0) WinWait($title,$text,$timeout) If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) EndFunc $win1 = "Text 1" $win2 = "Text 2" _WinWaitActivate($win1,"WARNING: This progra") Send("{ALTDOWN}n{ALTUP}");Send("{SPACE}") _WinWaitActivate($win1,"I DISAGREE and &do n") Send("{UP}n") _WinWaitActivate($win1,"Customer Information") Send("{ALTDOWN}n{ALTUP}");Send("{TAB}{TAB}n") _WinWaitActivate($win1,"Click Next to instal") Send("{ALTDOWN}n{ALTUP}");Send("n") _WinWaitActivate($win1,"This feature require") Send("{ALTDOWN}n{ALTUP}");Send("{TAB}n") _WinWaitActivate($win1,"Ready to Install the") Send("{ALTDOWN}i{ALTUP}");Send("i") _WinWaitActivate($win1,"The InstallShield Wi") Send("{ALTDOWN}f{ALTUP}");Send("f") _WinWaitActivate($win2,"You must restart you") Send("{ALTDOWN}n{ALTUP}");Send("n") Now if any new screen comes in the middle of installation, like some VC++ installation error or like that.
      The AutoIT is waiting in the background.
      Is there any way to skip the new screens with just "enter" and continue the installation??
    • By Spyderco
      Hi everyone

      I'll explain what I'm trying to achieve briefly:

      I run several websites and am running pilots for a new framework on a few server.
      I have a certain script set us like a bunch of checkboxes, one of which checks a URL for it's status response set to a $ClientURL variable.
      So I have something like the following:

      Set includes
      Set variables (one of which is $ClientURL = ("www.example.com").
      Start loop
         Main script
            If $ClientURL = ("www.example.com") Then
                $ClientURL = ("www.a.com")
            If $ClientURL = ("www.a.com") Then
               $ClientURL = ("www.b.com")
            ElseIf $ClientURL = ("www.b.com") Then
               $ClientURL = ("www.c.com")
            ElseIf $ClientURL = ("www.c.com") Then
               $ClientURL = ("www.d.com")
            ElseIf $ClientURL = ("www.c.com") Then
               $ClientURL = ("www.example.com")
            Sleep until the script restarts the loop.
      End loop

      This only uses one main script and changes the variables needed to run in by the following value every time.
      My problem is this...
      Everything runs smoothly, but if a webserver takes too long to respond, the program will timeout.
      This doesn't give a certain status, so it doesn't get logged by the script so it can move on to the next one.
      It just freezes and crashes on it eventually.
      Is there a way to add a certain timeout to a line?
      Lets say something like this:
      Func A ()
      $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
      $oHTTP.Open("GET", $ClientURL, False)
      $oHTTP.Send()
      If the time it takes = >10 seconds
         Move on to the next line
      Else
         Do nothing
      EndFunc

      I thought about making a variable that tracks the system time in seconds that has passed by and resets it at the beginning of every new function,
      but I was hoping there'd be something more efficient...
      Thanks in advance guys!
    • By explorerpl
      Hi. I'm a teacher and I do a lot of tutorials and other presentations on my computer. I've developed a tool using AutoIt and Adobe AIR to display all the shortcuts I use while I'm presenting. According to the forum rules this would mean that I've developed a keylogger, so I can't show any of the code, but I'm still hoping someone will help me solve an issue I'm having - a memory leak (or at least I think that's it).
      I can see the application is taking up more and more memory, but it never goes super crazy. I think it was at 25 MB at one point and that was it. However I see that the longer the application is running less responsive it is. It doesn't capture all the events, or it simply lags. 
      I'm using AssocArrays and _MouseOnEvent UDFs, _WinAPI_SetTimer, _WinAPI_SetWindowsHookEx, _Singleton and TCP. I've done some research before posting this and I know there are some issues in special cases, but all solutions were "code specific". Since I can't post any of the code I couldn't respond in those threads. Other than that it really doesn't seem to be the problem with any of the UDFs, so my question is:
      Is this a memory leak? If so how can I find it and remove it? What to do to avoid it in the future.
      I understand that declaring variables over and over (something in the timer) may be the cause of this, so according to what I've read on the forum I've changed the variables to Global and moved them outside the functions. That way they are only declared once, and then only values are being reassigned. That unfortuantly didn't help. Is there anything else I could do or look for?
      BTW - I've used Adobe AIR to create a nice UI. If someone want's to create something similar UEZ was kind enough to share his code of creating such GUI with nice antialiased labels. 
      https://www.autoitscript.com/forum/topic/178366-adobe-air-like-window/#comment-1280587

×
×
  • Create New...