Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/14/2013 in all areas

  1. MHz

    Is AutoIT perfect?

    I thought this topic was starting to turn for the better and then the worship is starting to come to surface again. As for development, it is being worked on. Enjoy 3.3.8.1 because it is good. Do not worry about what is coming tomorrow, worry about what you have today. As tomorrow you will wonder why you worried so much about what you could have today which was not needed for tomorrow anyhow.
    2 points
  2. copyrigth, This should get you started... ; *** Start added by AutoIt3Wrapper *** #include <Constants.au3> #include <GUIConstantsEx.au3> ; *** End added by AutoIt3Wrapper *** #include <array.au3> #AutoIt3Wrapper_Add_Constants=n local $iniFile = @scriptdir & '\computers.ini' local $aSections = IniReadSectionNames($iniFile) if not isarray($aSections) then msgbox($mb_ok,'INI READ Section Names ERROR','File = ' & $iniFile) Exit endif local $gui010 = guicreate('INI to ListView control Example') local $aGuiSize = wingetclientsize($gui010) local $lv010 = guictrlcreatelistview('Computer|Student|OpSys',20,20,$aGuiSize[0]-40,$aGuiSize[1]-40) guisetstate() ; populate listview local $aSection, $sLVItem for $1 = 1 to $aSections[0] $aSection = inireadsection($iniFile,$aSections[$1]) if @error = 1 then msgbox($mb_ok,'INI READ Section ERROR','File = ' & $iniFile) Exit endif for $2 = 1 to $aSection[0][0] $sLVItem &= $aSection[$2][1] & '|' next if guictrlcreatelistviewitem($aSections[$1] & '|' & $sLVItem,$lv010) = 0 then msgbox($mb_ok,'ListView Item Create ERROR','Item = ' & $aSections[$1] & '|' & $sLVItem) Exit endif $sLVItem = '' next while 1 switch guigetmsg() case $gui_event_close Exit EndSwitch wend kylomas edit: the ini file looks like this [copmuter1] user=student001 OS=win7 [copmuter2] user=Admin OS=winxp [copmuter3] user=student009 OS=win7 [copmuter4] user=dumb ass student OS=win7 [copmuter5] user=M23 OS=win7
    1 point
  3. Naw, just ordered new fingers from www.Itypeforshit.com...
    1 point
  4. Melba23

    Security Program (Problem)

    Doctorkirk, Quite probably the correct answer. However, as you seem so put out I will welcome to the Autoit Forum - and put you out of your misery. You correctly state that the script enters an infinite loop and then becomes unresponsive. So the trick is to get the outer loop to include the check for Explorer.exe - you can use a flag to only check when you need. And as a matter of fact you would also never leave the unlock loop either. See if you can follow what is happening here - it tells you what is going on as you progress through the script: #include<GuiConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $id = 'asd', $psw = '123', $fFlag = False $maingui = GUICreate('Blocco PC', 200, 100) $b = GUICtrlCreateButton('Lock', 30, 40) GUISetBkColor('FFFFFFF', $maingui) $sb = GUICtrlCreateButton('Unlock', 100, 40) GUISetState() While 1 Switch GUIGetMsg() Case $b MsgBox(0, "Hi", "Setting the flag") $fFlag = True ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Set the flag Case $sb $logingui = GUICreate('Login', 170, 130) GUICtrlCreateLabel('Name', 2, 2) GUICtrlSetFont(-1, 8, 5000) $nome = GUICtrlCreateInput('', 2, 25, 90, 20) GUICtrlSetFont(-1, 8, 5000) GUICtrlCreateLabel('Password', 2, 50) GUICtrlSetFont(-1, 8, 5000) $pw = GUICtrlCreateInput('', 2, 65, 90, 20, 0x00020) GUICtrlSetFont(-1, 8, 5000) $login = GUICtrlCreateButton('Login', 2, 90, 80, 20) GUICtrlSetFont(-1, 8, 5000) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $login If GUICtrlRead($nome) = $id And GUICtrlRead($pw) = $psw Then ;ShellExecute('C:\Windows\explorer.exe') MsgBox(0, "Hi", "Explorer restarted") $fFlag = False ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Clear flag ToolTip("") ExitLoop ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Exit the loop Else Beep(3000, 3000) Beep(3000, 3000) Beep(3000, 3000) EndIf EndSwitch WEnd GUIDelete($logingui) Case $GUI_EVENT_CLOSE Exit EndSwitch If $fFlag Then ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Only check and close if the flag is set ToolTip("Checking for Explorer") ;If ProcessExists('explorer.exe') Then ; ProcessClose('explorer.exe') ;EndIf EndIf WEnd All clear? Please ask if not. And finally, I am not really in favour of your method of lockng the PC - there are much better ways out there if you search the forum. M23
    1 point
  5. Mechaflash

    Is AutoIT perfect?

    If I could program my toaster with AutoIt, I'd be a happy camper =D
    1 point
  6. Everything inside a () is captured. If the set [] is outside of any capturing group () or inside any non-capturing group (?: ) it won't be captured, it would only be matched. If you don't know the difference b/w a Lazy(*?)and Greedy(*) quantifier look here orelse further explanation would be difficult ..! In short Greedy : match everything which satisfies the pattern. After match if the next pattern matches, the engine goes on but otherwise the characters matched by the greedy operator is back-traced(given back one by one) till the next pattern is satisfiedLazy : match once and check if rest of the pattern satisfies. If yes don't match any more, if no, match one more and check again. It is just matched not captured.Anything not in capturing group is just matched http//www.example.com/path/index.php?toto#fragment. The slash in bold and underline is matched in your regex(which failed). I would provide a step-wise decode. Hope then you could understand deeper. Hold a while
    1 point
  7. Why don't you use the Excel UDF that comes with AutoIt to handle your Excel files? You get much more support than for the ExcelCOM UDF.
    1 point
  8. Melba23

    Software Installer

    habib64, First, welcome to the AutoIt forum. I suggest you post your code - and the associated ini file - so that we can see where you might have gone wrong. When you post your script please use Code tags - put [autoit] before and [/autoit] after your posted code. Then you get a scrolling box and syntax colouring which makes it easier to read. M23
    1 point
  9. I have explained your problem with a possible easy solution. The explanation is full and in detail. Ask if you still don't understand what is happening. QuickTip You cannot combine RegEx(es) to make a combined search (you will understand what I mean by reading the code thoroughly)There is no need to escape special chars except # inside a character set (this is even explained in the following code)#include <Array.au3> Local $s = "", $a = 0 #cs [\?] is the same as [?] no need to escape special characters inside a set. With the exception of any \# special chars like to match either "\" or "r" use [\\r] or [r\\] #ce $s = "http://www.example.com/path/index.php?toto#fragment" $a = StringRegExp($s, "/([^/]*$)", 1) ;1st part, works ;/ (Non-Capturing) Slash | Non-Capturing Match : / (this is the last "/" since you used "$") ;([^/]*$) (capturing group) consisting of "non-slash" characters (greedy) after which a line-break is present | Capturing Match : index.php?toto#fragment ConsoleWrite($a[0] & @CRLF) $a = StringRegExp($s, "(.*?)[#?]", 1) ;2nd part, works ;(.*?) (Capturing Match) Anything from the start except line-feed(Lazy) | Capturing Match : http://www.example.com/path/index.php ;[#?] (non-capturing) after which "#" or "?" is present | Non-Capturing Match : ? ConsoleWrite($a[0] & @CRLF) $a = StringRegExp($s, "/([^/]*$)[#?]", 1) ;both: does not work. If Not IsArray($a) Then ConsoleWrite("It is not an Array" & @CRLF) ;/ (Non-Capturing) Slash | Non-Capturing Match : / (this is the last "/" since you used "$") ;([^/]*$) (capturing group) consisting of "non-slash" characters (greedy) after which a EOL is present | Capturing Match : index.php?toto#fragment ;[#?] either match # or ?. Now here is the problem or error. Everything is already matched. No Hash or Question-mark is left to match. Hence an array is not returned. ;.....Solution...==================================================================================================================================================================================================================================== $a = StringRegExp($s, "([^#?]+)(.*)", 1) ;This would work ;([^#?]+) (capturing group) consisting of "non-(question-mark and hash)" characters (greedy) | Capturing Match : http://www.example.com/path/index.php ;(.*) (capturing group)Logic: We know that this is either a Hash or a Question-mark, so lets match everything till the end. We know that "." will not match any line-feed character | Capturing Match : ?toto#fragment ConsoleWrite("-: " & $a[0] & @CRLF & "-: " & $a[1] & @CRLF) ;Note that if you just want to receive "index.php" in the zero-index ;Add a this group in the beginning (?:.*/) ;What this would do ? ;(?:.*/) : (non-capturing) ".*" will consume the full string. Then when "/" is encountered the regex-engine will backtrace to the last "/" and hence the non-captuing match would be "http://www.example.com/path/". ;Thereafter the remaining regex will match only "index.php" & "?toto#fragment" Hope you figure out your problems. Thumbs up if helped. Regards
    1 point
  10. Pandora is not accessible here without using proxy and co., so i can't test anything. But i can give you some guidance, first of all take a look to in the pandora sign up page source: http://www.pandora.com/account/sign-in all you need is to automate the form with this classname loginForm <form class="loginForm" action="#">that containt 2 input and a button. One input is named email <input class="field" type="email" name="email"></input>the other is named password <input class="field" type="password" name="password"></input> The button that you have to press has this class name btn_bg welcome_btn loginButton <input class="btn_bg welcome_btn loginButton" type="submit" value="Sign in"></input> Take a look to this functions _IEFormGetObjByName, _IEFormElementGetObjByName, _IEFormElementSetValue, _IEFormSubmit. Hi!
    1 point
  11. Jos

    Is AutoIT perfect?

    Can only agree ... but is part of life...
    1 point
  12. Chimaera

    Is AutoIT perfect?

    Without trying to be kiss ass there is nothing but respect for anyone who has worked on the AutoIt Code/Program. We wouldn't be where we are atm without the contributions of the many that give to the rest the program we use. I know you guys at the higher levels dont always see eye to eye but its still a shame and a loss to AutoIt as a whole when that's the case.
    1 point
  13. Jos

    Is AutoIT perfect?

    Mhz, I don't see anything wrong in the last couple of statements made about supportability and believe trancexx made the same remarks earlier. There is nothing else than respect when it comes to the code that was written by her. Jos
    1 point
  14. With _ExcelBookOpen you can pass a password. After calling the function check for @error <> 0.
    1 point
  15. You on the other hand are a Snarky Mole Rat
    1 point
  16. Jos

    Is AutoIT perfect?

    ... The latter case can only mean you are talking about me in which case I can only thank you and you are forgiven for your ignorance. Jos
    1 point
  17. trancexx

    Is AutoIT perfect?

    Of course it's abandoned. Only blind people don't see that. Or ignorant people. I wish that wouldn't be truth, but it is. I had to scream really loud even for 3.3.8 to happen. It's not very known that I actually brainwashed few people to make things moving back then. Sure, there will likely be new version released soon, but that has nothing to do with active development. In one scenario dev team will only release the work I have done on the language and the tools during last year. That's one year after most of the code has been written. OMG. Considering I'm not developer any more, reasonable developer should think twice before releasing. Really, how serious is to release code of the developer that is not that any more. Third scenario is going back a year with the code. Then everything is safe but Jon and the team looks like clowns (no offense meant). Fourth scenario is that development will continue actively, serious development, not some development playing. But that's as like as no one taking offense by this post. Speaking as mere user, I hope AutoIt dev team (Jon) will find the solution. I really really love this language, use it every day actually, and besides that I know how much work people other than developers have done for it.
    1 point
  18. Jos

    Is AutoIT perfect?

    not sure slightly is the right word here
    1 point
  19. nping.exe is a console line portable application that scans a network based on a supplied network address from any Windows machine. It is designed for system administrators and other people who are inclined to have need for a simple network scanner. This is finished and complete software. Output: Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\Jos>nping nping.exe scans a network based on a supplied network address. Usage: nping.exe [ipaddress] [local 1-4] [listlocal] Examples: nping.exe 192.168.0.0-1 will ping these addresses: 192.168.0.0 and 192.168.0.1 nping.exe 192.168.20.* will ping everything in the range from 192.168.20.1 to 192.168.20.255 nping listlocal gives you a list of local ipaddresses recognized by the program nping local pings your local network, if your ip addresses is 10.0.5.100 then it will p ing everything in 10.0.5.* C:\Users\Jos>nping 74.125.79.* Pinging 255 addresses in range of 74.125.79.* 74.125.79.4 has a roundtrip of 17 ms 74.125.79.5 has a roundtrip of 18 ms 74.125.79.6 has a roundtrip of 22 ms 74.125.79.18 has a roundtrip of 15 ms 74.125.79.27 has a roundtrip of 15 ms 74.125.79.32 has a roundtrip of 17 ms 74.125.79.47 has a roundtrip of 16 ms 74.125.79.52 has a roundtrip of 15 ms 74.125.79.53 has a roundtrip of 16 ms 74.125.79.54 has a roundtrip of 16 ms 74.125.79.57 has a roundtrip of 19 ms 74.125.79.58 has a roundtrip of 16 ms 74.125.79.77 has a roundtrip of 15 ms 74.125.79.79 has a roundtrip of 17 ms 74.125.79.81 has a roundtrip of 15 ms 74.125.79.82 has a roundtrip of 19 ms 74.125.79.84 has a roundtrip of 13 ms 74.125.79.85 has a roundtrip of 18 ms 74.125.79.86 has a roundtrip of 26 ms 74.125.79.91 has a roundtrip of 22 ms 74.125.79.111 has a roundtrip of 14 ms 74.125.79.114 has a roundtrip of 17 ms 74.125.79.116 has a roundtrip of 19 ms 74.125.79.118 has a roundtrip of 22 ms 74.125.79.142 has a roundtrip of 22 ms 74.125.79.143 has a roundtrip of 23 ms 74.125.79.147 has a roundtrip of 20 ms 74.125.79.149 has a roundtrip of 24 ms 74.125.79.161 has a roundtrip of 21 ms 74.125.79.166 has a roundtrip of 17 ms 74.125.79.184 has a roundtrip of 15 ms 74.125.79.206 has a roundtrip of 24 ms 74.125.79.222 has a roundtrip of 16 ms 74.125.79.223 has a roundtrip of 16 ms 74.125.79.224 has a roundtrip of 16 ms 74.125.79.225 has a roundtrip of 17 ms 74.125.79.226 has a roundtrip of 17 ms 74.125.79.231 has a roundtrip of 21 ms 74.125.79.237 has a roundtrip of 22 ms 74.125.79.230 has a roundtrip of 21 ms 74.125.79.250 has a roundtrip of 18 ms 74.125.79.252 has a roundtrip of 16 ms 74.125.79.254 has a roundtrip of 20 ms Ping statistics for 74.125.79.*: Total hosts pinged: 255 Total hosts UP: 43 [16.86%] Total hosts DOWN: 212 [83.14%] Average roundtrip: 18ms C:\Users\Jos> Tip ! Use the following command to write the results to a text file, you can then use a batch / AutoIt or VBS script to email you the results: nping 192.168.20.0-100 > networklog.txtIt will place the results in a file called networklog.txt Code: #NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=C:\Windows\Installer\{B924C008-D667-3B26-84C6-BD70285F9BFC}\Icon_app.ico #AutoIt3Wrapper_outfile=nping.exe #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_Change2CUI=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Constants.au3> #include <Array.au3> Global Const $MAX_PROCESS = 25 ; A maximum number of processes Global Const $MAX_HOSTS = 16777216 ; A maximum number of hosts to ping due to AutoIt's array limit size, and yes, I can work around it but no, I won't Local $networkRange = "" Local $showLocal = False Local $numOfLocalIp = 1 If @Compiled Then If $CmdLine[0] > 0 Then For $n = 1 to UBound($CmdLine)-1 Switch $CmdLine[$n] Case "/?", "?", "/help", "/info" _showHelp() Exit 0 case "listlocal", "locallist" ConsoleWrite("Local IP addresses known to this machine: " & @CRLF) ConsoleWrite("1: " & @IPAddress1 & @CRLF) ConsoleWrite("2: " & @IPAddress2 & @CRLF) ConsoleWrite("3: " & @IPAddress3 & @CRLF) ConsoleWrite("4: " & @IPAddress4 & @CRLF) ConsoleWrite(@CRLF) ConsoleWrite("Use: nping local # to ping all devices on these networks") Exit 0 case "local" $showLocal = True $n +=1 If $n < UBound($CmdLine) Then If $CmdLine[$n] = Number($CmdLine[$n]) Then $numOfLocalIp = Number($CmdLine[$n]) If $numOfLocalIp < 1 Or $numOfLocalIp > 4 Then ConsoleWrite("Local IP address index number must be between 1 and 4" & @CRLF) Exit 0 EndIf EndIf EndIf Case Else $networkRange = $CmdLine[1] EndSwitch Next Else _showHelp() Exit 0 EndIf EndIf If $showLocal Then $localIp = Execute("@IpAddress" & $numOfLocalIp) $ipParts = StringSplit($localIp, ".") $networkRange = $ipParts[1] & "." & $ipParts[2] & "." & $ipParts[3] & ".*" EndIf Local $tStart = TimerInit() $aArray = _GetIpAddressList($networkRange) If @error = 1 Then ConsoleWrite("There are no addresses to be scanned in this range. Check the syntax of your network range." & @CRLF & @CRLF) _showHelp() Exit 1 EndIf If @error = 2 Then ConsoleWrite("Maximum number of hosts to ping is " & $MAX_HOSTS & ", but you tried to ping " & @extended & " hosts" & @CRLF & @CRLF) _showHelp() Exit 1 EndIf Local $iTotal = UBound($aArray) If $iTotal = 1 Then ConsoleWrite("Pinging " & $iTotal & " address in range of " & $networkRange & @CRLF) Else ConsoleWrite("Pinging " & $iTotal & " addresses in range of " & $networkRange & @CRLF) EndIf ConsoleWrite(@CRLF) Local $aProcess[$MAX_PROCESS] ; An array to keep a reference to spawned processes, in the next loop we fill it with value 0 for reference For $i = 0 To UBound($aProcess) - 1 $aProcess[$i] = 0 Next Local $i = 0 ; which IP are we currently trying to ping ( based on array ) Local $iFinished = 0 ; how many processes have finished pinging Local $iUp = 0 ; Total hosts that are UP Local $iDown = 0 ; Total hosts that are DOWN Local $iTotalRoundTrip = 0 ; Total roundtrip (all the +ms added together) While 1 ; We check all the currently running processes For $n = 0 To UBound($aProcess) - 1 ; Check if we need a spot, and there is an existing spot here If ($i <> UBound($aArray) And $aProcess[$n] == 0) Then $aProcess[$n] = _MSPing($aArray[$i]) ; Spawn a new process in the available spot $i += 1 ; Increment $i so we can do the next process the next time around Else ; Check if this process has been spawned and the process is ready If ($aProcess[$n] <> 0 And _MSPingIsReady($aProcess[$n])) Then ; Get results from the command $sHostname = _MSPingGetHostname($aProcess[$n]) $sResult = _MSPingGetResult($aProcess[$n]) If ($sResult <> -1) Then ; Check if the host is up ConsoleWrite($sHostname & " has a roundtrip of " & $sResult & " ms" & @CRLF) $iUp += 1 $iTotalRoundTrip += $sResult Else $iDown += 1 EndIf ; Free up an empty space for the next address to Ping $aProcess[$n] = 0 ; Increment the total of processes that have finished $iFinished += 1 ; If the total number of finished processes If ($iFinished == UBound($aArray)) Then ExitLoop 2 ; Return EndIf EndIf Next Sleep(50) ; Give existing ping commands some time to process the request WEnd If $iUp = 0 Then ConsoleWrite("No devices replied to the ping in this range" & @CRLF) Exit 0 EndIf Local $percentageUp = Round($iUp / $iTotal * 100, 2) Local $percentageDown = 100-$percentageUp Local $tTotal = TimerDiff($tStart) Local $averageRoundTrip = Round($iTotalRoundTrip / $iUp) Local $sUpPad = "" Local $sDownPad = "" For $i = 0 To 6 - StringLen(String($iUp)) $sUpPad &= " " Next For $i = 0 To 6 - StringLen(String($iDown)) $sDownPad &= " " Next ConsoleWrite(@CRLF) ConsoleWrite("Ping statistics for " & $networkRange & ":" & @CRLF) ConsoleWrite(@TAB & "Total hosts pinged: " & $iTotal & @CRLF) ConsoleWrite(@TAB & "Total hosts UP: " & $iUp & $sUpPad & "[" & $percentageUp & "%]" & @CRLF) ConsoleWrite(@TAB & "Total hosts DOWN: " & $iDown & $sDownPad & "[" & $percentageDown & "%]" & @CRLF) ConsoleWrite(@TAB & "Average roundtrip: " & $averageRoundTrip & "ms" & @CRLF) Func _showHelp() ConsoleWrite("nping.exe scans a network based on a supplied network address." & @CRLF & @CRLF & _ "Usage: nping.exe [ipaddress] [local 1-4] [listlocal]" & @CRLF & @CRLF & _ "Examples: " & @CRLF & " nping.exe 192.168.0.0-1" & @CRLF & " will ping these addresses: 192.168.0.0 and 192.168.0.1" & @CRLF & _ " nping.exe 192.168.20.*" & @CRLF & " will ping everything in the range from 192.168.20.1 to 192.168.20.255" & @CRLF & _ " nping listlocal" & @CRLF & " gives you a list of local ipaddresses recognized by the program" & @CRLF & _ " nping local" & @CRLF & " pings your local network, if your ip addresses is 10.0.5.100 then it will ping everything in 10.0.5.*" & @CRLF) EndFunc Func _GetIpAddressList($ipFormat) If $ipFormat = "" Then Return SetError(1) EndIf $ipFormat = StringReplace($ipFormat, "*", "1-255") $ipSplit = StringSplit($ipFormat, ".") If $ipSplit[0] <> 4 Then TCPStartup() Local $ret[1] = [TCPNameToIP($ipFormat)] If @error Then Return SetError(1) Return $ret EndIf For $i = 1 To 4 If Not StringRegExp($ipSplit[$i], "[0-9\-]*") Then TCPStartup() Local $ret[1] = [TCPNameToIP($ipFormat)] If @error Then Return SetError(1) Return $ret EndIf Next Local $ipRange[4][2], $totalPermu = 1 For $i = 0 To 3 If StringInStr($ipSplit[$i + 1], "-") Then $m = StringSplit($ipSplit[$i + 1], "-") $ipRange[$i][0] = $m[1] $ipRange[$i][1] = $m[2] Else $n = Number($ipSplit[$i + 1]) $ipRange[$i][0] = $n $ipRange[$i][1] = $n EndIf $totalPermu *= $ipRange[$i][1] - $ipRange[$i][0] + 1 Next If $totalPermu > $MAX_HOSTS Then Return SetError(2, String($totalPermu)) EndIf Local $result[$totalPermu], $i = 0 For $a = $ipRange[0][0] To $ipRange[0][1] For $b = $ipRange[1][0] To $ipRange[1][1] For $c = $ipRange[2][0] To $ipRange[2][1] For $d = $ipRange[3][0] To $ipRange[3][1] $result[$i] = $a & "." & $b & "." & $c & "." & $d $i += 1 Next Next Next Next Return $result EndFunc ;==>_GetIpAddressList Func _Exit() Exit EndFunc ;==>_Exit Func _MSPing($sHostname, $timeout = 50) Local $return_struc[4] ; [0] = Result (in ms) ; [1] = The hostname originally used ; [2] = Process handle (for internal use only) ; [3] = Buffer (for internal use only) $return_struc[1] = $sHostname $return_struc[2] = Run("ping " & $sHostname & " -n 1 -w " & $timeout, "", @SW_HIDE, $STDOUT_CHILD) Return $return_struc EndFunc ;==>_MSPing Func _MSPingIsReady(ByRef $return_struc) Return ___MSPingReadOutput($return_struc) EndFunc ;==>_MSPingIsReady Func _MSPingGetResult($return_struc) Return $return_struc[0] EndFunc ;==>_MSPingGetResult Func _MSPingGetHostname($return_struc) Return $return_struc[1] EndFunc ;==>_MSPingGetHostname ; Internal use only Func ___MSPingReadOutput(ByRef $return_struc) $data = StdoutRead($return_struc[2]) If (@error) Then ___MSPingParseResult($return_struc) Return 1 Else $return_struc[3] &= $data Return 0 EndIf EndFunc ;==>___MSPingReadOutput ; Internal use only Func ___MSPingParseResult(ByRef $return_struc) $result = StringRegExp($return_struc[3], "([0-9]*)ms", 3) If @error Then $return_struc[0] = -1 Else $return_struc[0] = $result[0] EndIf EndFunc ;==>___MSPingParseResult Old version downloads: 180 Download: nping.exe
    1 point
  20. Special Note: This is an official beta release but it is not digitally signed. Only Jon has the certificate used for digital signatures and the last time I checked I was not Jon. 3.3.9.4 (9th April, 2012) (Beta) NOTE: Version 3.3.9.3 has been replaced with version 3.3.9.4 due to an issue where scripts with icons would not compile correctly. If you are using 3.3.9.3 please update immediately. 3.3.9.3 (8th April, 2012) (Beta) The following changes are script breaking changes: NOTE: WinAPIEx is included in this release. The files exist but there are no documentation or examples. Filenames and functions are subject to change or removal. Functions will be moved out to other files before the final release and the file WinAPIEx.au3 will likely not exist when that happens. Report issues here. Download here.
    1 point
×
×
  • Create New...