
suthers
Active Members-
Posts
59 -
Joined
-
Last visited
suthers's Achievements

Wayfarer (2/7)
0
Reputation
-
Ping function not working as expected.
suthers replied to suthers's topic in AutoIt General Help and Support
Thanks so much for all your help on this computergroove. Yes, I do get a reply from 127.0.0.1 when no network is available - identical to the response from other internal network addresses. Drat. That was a good idea :-) I also tested the 'wait for everything to initialize' idea - no luck there either. No matter how long you wait the situation does not change. Looks like the only option at present is to use the Windows ping fuction via RunWait() as you suggested. Is there a way to track whether the developers intend and/or have completed fixing AutoIT's own ping function? -
Ping function not working as expected.
suthers replied to suthers's topic in AutoIt General Help and Support
Nice try, but no luck. The script is testing mostly internal addresses, and often (due to our internet arrangements) the internet is inaccessible but the internal addresses are. To kill the script based on loss of Google or DNS isn't an option. -
Ping function not working as expected.
suthers replied to suthers's topic in AutoIt General Help and Support
No, sorry, some misunderstanding there. The only condition under which it fails is if the computer is rebooted with the network cable unplugged. The issue is fixed as soon as a valid network is connected, or if the computer is rebooted with the cable in place. -
Ping function not working as expected.
suthers replied to suthers's topic in AutoIt General Help and Support
OK - will do. I can't reboot my machine at present as it's running a long connectivity monitoring task for me, but will post back when I do. I'm pretty sure I have already left it quite long (>10 minutes) times and it's still doing it, but will confirm definitely with a specific test. -
Ping function not working as expected.
suthers replied to suthers's topic in AutoIt General Help and Support
Thanks very much for that suggestion for a work-around. Will try that today. I was hoping we could get the native AutoIT function fixed, but no-one seems to be posting in that regard. -
Hi All, My question relates to the behavior of the Ping function under certain conditions. The code for testing this is: $PingResult = Ping("192.168.1.2") MsgBox (0,"Ping Test", "Ping Return Value = " & $PingResult & @CRLF & "@Error Value = " & @error) The IP address above is our local Exchange server. If all is good, it outputs return value of 1 (ms) and @Error of 0 (no error) If I unplug the network cable, it outputs return value of 0 (ms) and @Error of 2 (Host Unreachable) All OK so far! However, if I clean reboot the machine with the network cable disconnected, it gives a return value of 1 (ms) and @Error value of 0 It's driving me batty, as there is no way to distinguish this result from the result returned when all is well and the server response time is 1ms. According the help file on the Ping command I should be testing the return value, and if it is > 0 a successful Ping was obtained - but in the clean reboot situation it is returning a value of 1 when the computer does not even have a valid network connection! If I use the good-old Windows Ping command after the clean reboot, it correctly reports that it cannot send the ping request. Is this a bug in the ping command? Info for replicating the situation: You must use a local IP address, not something requiring DNS resolution like myserver.local. Machine: Windows 7 Pro SP1 32 bit fully patched AutoIT: V3.3.8.1 Thanks very much :-) Bill
-
Thank you so much Jos!!!!!! Changing -1 to Default (without quotes) worked for me too, after getting a serious headache trying to figure out why my code had broken. Any chance of getting something about this added to the documentation / help file? My current help file (v3.3.8.1) still has -1's in the example code section. Shalom Bill
-
I've got 3.3.0.0 installed, and have searched around in the installation, but cannot find them. Can you give me a pointer as to where they are exactly? Thanks.
-
Hi all, Can anyone point me where to find the SciTE definitions for AutoIT V3.3.0.0? I have hunted around the websites without success. Basically I need the contents of the SciTE instalation folder 'Defs\Production' for V3.3.0.0 Shalom Bill
-
winHTTP Upload Binary Data
suthers replied to autoituser123's topic in AutoIt General Help and Support
Code sample definately required. A flag of 16 for binary usage is used with FileOpen(), not FileRead(). Using it with FileRead() will only read the first 16 characters. -
!>AutoIT3.exe ended.rc:-1073741819 Crash
suthers replied to suthers's topic in AutoItX Help and Support
Thanks Richard :-) I'm using release version v3.3.0.0 -
!>AutoIT3.exe ended.rc:-1073741819 Crash
suthers replied to suthers's topic in AutoItX Help and Support
I thought I might have posted in the wrong place - can I move it, or should I repost in the general support forum? As to dubug, I had HEAPS of debug line in the original code, but deleted them in what I posted, trying and make the posting the shortest possible code that showed the crash. It crashes while waiting in the While-Wend loop. The interval of time it waits matches the time taken for the download to complete, which is what makes me think it's crashing when the event is fired. -
!>AutoIT3.exe ended.rc:-1073741819 Crash
suthers replied to suthers's topic in AutoItX Help and Support
From the AutoIT Helpfile in the 'COM Extensions to AutoIt' section : 'you can add a UDF with only the prefix. In this example: Func IEEvent_($Eventname). When an event is received and no IEEvent_ Eventname UDF exists, this function will be called instead and the name of the event will be placed in the variable $Eventname.' This is what I based the function on. It it not correct? -
Hi All, I'm trying my first attempt to respond to a COM object event. The object is winhttp.winhttprequest.5.1 The event is OnResponseFinished Documentation on the object is at http://msdn.microsoft.com/en-us/library/aa384106(VS.85).aspx The following code runs fine to set up the object & start the download in asynchronous mode. However, when the download ends and (I presume) the event is fired AutoIT crashes with the return code of 1073741819 (as reported by SciTE) Any suggestions as to where I've gone wrong? Much Thanks Bill $SourceURL = "http://kitco.com/images/live/gold.gif" $TempFile = @TempDir & "\AutoITTempWinTHHPRequest.gif" $COMError = "no" $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") ; COM error handler $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") ;set up HTTP Request Object $oMyEventFinished = ObjEvent($oHTTP, "WinHTTPEvent_") ; Event handler $oHTTP.Open("GET", $SourceURL, 1) $COMError = "no" ; flag for com error experienced $Ended_b = 0 ; flag for download in progress $oHTTP.Send() SplashTextOn (@ScriptName,"Downloading" & @CRLF & $SourceURL) While $Ended_b = 0 ; wait for download. Ended_b is set by the event function Sleep (250) WEnd SplashOff() If $COMError = "no" Then ; save the result to file $FileHandle = FileOpen ($TempFile,18) FileWrite ($FileHandle, $oHTTP.ResponseBody) FileClose($FileHandle) ShellExecute ($TempFile) ; open the file for viewing Else MsgBox (0,"ERROR!", "Winhttprequest download failed.") EndIf $oHTTP = 0 Exit ;FUNCTIONS Func MyErrFunc() ; error handler for winhhtprequest com errors $HexNumber = Hex($oMyError.number, 8) if $ReportWinHTTPRequestErrors = "yes" Then SetError(1) $COMError = "yes" ; set error flag EndIf EndFunc ;==>MyErrFunc Func WinHTTPEvent_ ($EventName) ; event handler function if $EventName = "OnResponseFinished" then $Ended_b = 1 ; set downloading flag EndFunc
-
Mmmm...I won't know for certain till I get home & test there, but it looks like the issue is external to AutoIT and related to the way our proxy servers here are processing the requests.