Sign in to follow this  
Followers 0
sleepydvdr

Available IPs

4 posts in this topic

#1 ·  Posted (edited)

Yesterday, I needed to find an available IP on our network. I had to do it the old fashioned way: open command line and start guessing at what to ping. Of course, I looked to AutoIt to make a tool that can take out the guesswork. I like a few thing I did to it that were new to me such as when the user enters an incorrect number, it highlights the incorrect fields. It's nothing incredible, but I think it's pretty neat.

Check it out below:

#include <file.au3>
#include <array.au3>
#include <inet.au3>
#include <guiconstants.au3>
#include <guicombobox.au3>
#include <guiconstantsex.au3>
#include <buttonconstants.au3>
#include <editconstants.au3>
#include <windowsconstants.au3>

Global $selectedIP, $errorCode = 0, $available, $availableIPOnly, $begin, $end, $errorLabel, $tempIpAddress = "", $count = 0, $outputIP = "", $outputIPOnly, $leftSide

If @IPAddress1 &lt;&gt; "0.0.0.0" Then
    $tempIpAddress = "Adapter #1: " &amp; @IPAddress1
    $selectedIP = @IPAddress1
    $count = $count + 1
EndIf

If @IPAddress2 &lt;&gt; "0.0.0.0" Then
    $tempIpAddress = $tempIpAddress &amp; "|" &amp; "Adapter #2: " &amp; @IPAddress2
    $selectedIP = @IPAddress2
    $count = $count + 1
EndIf

If @IPAddress3 &lt;&gt; "0.0.0.0" Then
    $tempIpAddress = $tempIpAddress &amp; "|" &amp; "Adapter #3: " &amp; @IPAddress3
    $selectedIP = @IPAddress3
    $count = $count + 1
EndIf

If @IPAddress4 &lt;&gt; "0.0.0.0" Then
    $tempIpAddress = $tempIpAddress &amp; "|" &amp; "Adapter #4: " &amp; @IPAddress4
    $selectedIP = @IPAddress3
    $count = $count + 1
EndIf

If $count &gt; 1 Then
    $initialGUI = GUICreate("Select the IP range", 330, 87)
    $Label = GUICtrlCreateLabel("What network adapter do you want to use?", 24, 8, 209, 17)
    $IPCombo = GUICtrlCreateCombo("", 24, 40, 200, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
    GUICtrlSetData($IPCombo, $tempIpAddress)
    $Go = GUICtrlCreateButton("Go", 240, 40, 59, 25, 0)
    GUISetState(@SW_SHOW)

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                Exit
            Case $Go
                $selectedIP = GUICtrlRead($IPCombo)
                If $selectedIP = "" Then
                    MsgBox(0, "Error", "You must make a selection from the drop-down list.")
                Else
                    GUIDelete($initialGUI)
                    ExitLoop
                Endif
        EndSwitch
    WEnd
EndIf

If StringInStr($selectedIP, @IPAddress1) Then
    $selectedIP = @IPAddress1
ElseIf StringInStr($selectedIP, @IPAddress2) Then
    $selectedIP = @IPAddress2
ElseIf StringInStr($selectedIP, @IPAddress3) Then
    $selectedIP = @IPAddress3
ElseIf StringInStr($selectedIP, @IPAddress3) Then
    $selectedIP = @IPAddress3
EndIf

$ipAddress = StringSplit($selectedIP, ".")

$mainGUI = GUICreate("Find Available IP Addresses", 450, 119)
$Label1 = GUICtrlCreateLabel("Enter IP Address Range", 16, 8, 170, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("From:", 24, 40, 30, 17)
$iOct1 = GUICtrlCreateInput($ipAddress[1], 24, 64, 33, 21)
GUICtrlSetState($iOct1, $GUI_DISABLE)
$iOct2 = GUICtrlCreateInput($ipAddress[2], 64, 64, 33, 21)
GUICtrlSetState($iOct2, $GUI_DISABLE)
$iOct3 = GUICtrlCreateInput($ipAddress[3], 104, 64, 33, 21)
GUICtrlSetState($iOct3, $GUI_DISABLE)
$iOct4 = GUICtrlCreateInput("", 144, 64, 33, 21)
GUICtrlSetTip($iOct4, "Must be a number between 1 and 253.")
GUICtrlSetLimit($iOct4, 3)
GUICtrlSetState($iOct4, $GUI_FOCUS)
$fLabel = GUICtrlCreateLabel("To:", 216, 40, 20, 17)
$fOct4 = GUICtrlCreateInput("", 216, 64, 33, 21)
GUICtrlSetTip($fOct4, "Must be a number between 1 and 254.")
GUICtrlSetLimit($fOct4, 3)
$Button1 = GUICtrlCreateButton("Find Available IP Addresses", 280, 8, 155, 41, 0)
$Combo1 = GUICtrlCreateCombo("10", 352, 64, 65, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
GUICtrlSetTip($Combo1, "A higher value may (or may not) give more accurate results. But it will run slower.")
GUICtrlSetData($Combo1, "10|100|1000|2000|4000|8000")
$Label4 = GUICtrlCreateLabel("Timeout [ms]", 280, 64, 64, 17)
GUICtrlSetTip($Label4, "A higher value may (or may not) give more accurate results. But it will run slower.")
$Label3 = GUICtrlCreateLabel("-", 193, 60, 12, 23)
GUICtrlSetFont(-1, 18, 400, 0, "Arial")
$Checkbox1 = GUICtrlCreateCheckbox("Show Unavailable IPs", 280, 92, 120, 17)
GUICtrlSetTip($Checkbox1, 'Unavailable IPs will be listed as "This IP address is in use"')
$fusionSolid = GUICtrlCreateLabel("www.fusionsolid.com", 22, 98, 150, 17)
GUICtrlSetColor($fusionSolid, 0x0033ff)
GUICtrlSetCursor ($fusionSolid, 0)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            _BeginPing()
        Case $fusionSolid
            ShellExecute("http://www.fusionsolid.com")
    EndSwitch
WEnd

Func _BeginPing()
    $outputIP = ""
    GUICtrlSetBkColor($iOct4, 0xffffff)
    GUICtrlSetBkColor($fOct4, 0xffffff)
    GUICtrlDelete($errorLabel)
    _ErrorCheck()
    If $errorCode = 0 Then
        GUISetState(@SW_DISABLE, $mainGUI)
        $baseAddress = GUICtrlRead($iOct1) &amp; "." &amp; GUICtrlRead($iOct2) &amp; "." &amp; GUICtrlRead($iOct3) &amp; "."
        $j = 0
        $k = 0
        $timeout = GUICtrlRead($Combo1)
        ProgressOn("Scanning for available IP addresses", "Progress")
        Dim $available[1], $availableIPOnly[1]
        $cycle = $end - $begin
        For $i = $begin To $end Step 1
            Ping($baseAddress &amp; $i, $timeout)
            If @error Then
                If @error = 1 Then
                    $errorMsg = "Host is offline"
                ElseIf $errorMsg = 2 Then
                    $errorMsg = "Host is unreachable"
                ElseIf $errorMsg = 3 Then
                    $errorMsg = "Bad destination"
                Else
                    $errorMsg = "Other errors"
                EndIf
                $available[$j] = $baseAddress &amp; $i &amp; " - " &amp; $errorMsg
                $availableIPOnly[$j] = $baseAddress &amp; $i
                $j += 1
                ReDim $available[$j + 1]
                ReDim $availableIPOnly[$j + 1]
            EndIf
            If NOT @error AND GUICtrlRead($Checkbox1) = 1 Then
                $available[$j] = $baseAddress &amp; $i &amp; " - " &amp; "This IP address is in use"
                $availableIPOnly[$j] = $baseAddress &amp; $i
                $j += 1
                ReDim $available[$j + 1]
                ReDim $availableIPOnly[$j + 1]
            EndIf
            ProgressSet(100 / $cycle * $k)
            $k += 1
        Next
        ProgressOff()
        GUISetState($mainGUI, @SW_ENABLE)

        $arraySize = UBound($available)
        If $available[$arraySize - 1] = "" Then
            ReDim $available[$arraySize - 1]
        EndIf

        $arraySize = UBound($availableIPOnly)
        If $availableIPOnly[$arraySize - 1] = "" Then
            ReDim $availableIPOnly[$arraySize - 1]
        EndIf
        GUISetState(@SW_ENABLE, $mainGUI)
        _OutputWindow()
    EndIf
EndFunc   ;==&gt;_BeginPing

Func _ErrorCheck()
    $errorCode = 0
    $begin = Number(GUICtrlRead($iOct4))
    $end = Number(GUICtrlRead($fOct4))
    If $begin &lt; 1 Or $begin &gt; 253 Or IsInt($begin) = 0 Then
        GUICtrlSetBkColor($iOct4, 0xffff33)
        $errorLabel = GUICtrlCreateLabel("The highlighted item (starting value) must be a number between 1 and 253", 24, 88, 376, 17)
        GUICtrlSetColor(-1, 0xFF0000)
        GUICtrlSetState($iOct4, $GUI_FOCUS)
        $errorCode = 1
    ElseIf $end &lt; 1 Or $end &gt; 254 Or IsInt($end) = 0 Then
        GUICtrlSetBkColor($fOct4, 0xffff33)
        $errorLabel = GUICtrlCreateLabel("The highlighted item (ending value) must be a number between 1 and 254", 24, 88, 376, 17)
        GUICtrlSetColor(-1, 0xFF0000)
        GUICtrlSetState($fOct4, $GUI_FOCUS)
        $errorCode = 1
    ElseIf $end &lt; $begin Then
        GUICtrlSetBkColor($iOct4, 0xffffff)
        GUICtrlSetBkColor($fOct4, 0xffffff)
        GUICtrlDelete($errorLabel)
        $errorLabel = GUICtrlCreateLabel("The starting value (From) must be lower than the ending value (To)", 24, 88, 376, 17)
        GUICtrlSetColor(-1, 0xFF0000)
        GUICtrlSetState($iOct4, $GUI_FOCUS)
        GUICtrlSetBkColor($fOct4, 0xffff33)
        GUICtrlSetBkColor($iOct4, 0xffff33)
        $errorCode = 1
    EndIf
EndFunc   ;==&gt;_ErrorCheck

Func _OutputWindow()
For $i = 1 to UBound($available) Step 1
    $outputIP = $outputIP &amp; $available[$i - 1] &amp; @CRLF
Next

$outputWindow = GUICreate("Available IP Addresses", 425, 441, 192, 124)
$outputDataWindow = GUICtrlCreateEdit("", 8, 8, 409, 393)
GUICtrlSetData($outputDataWindow, $outputIP)
$copyIPOnly = GUICtrlCreateButton("Copy IP Addresses Only", 8, 408, 203, 25)
$copyIPAndCode = GUICtrlCreateButton("Copy IP Addresses And Codes", 216, 408, 203, 25)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            GUIDelete($outputWindow)
            ExitLoop
        Case $copyIPOnly
            $outputIP = ""
            For $i = 1 to UBound($available) Step 1
                $outputIP = $outputIP &amp; $availableIPOnly[$i - 1] &amp; @CRLF
            Next
            ClipPut($outputIP)
            GUIDelete($outputWindow)
            ExitLoop
        Case $copyIPAndCode
            $outputIP = ""
            $outputIP = GUICtrlRead($outputDataWindow)
            ClipPut($outputIP)
            GUIDelete($outputWindow)
            ExitLoop
    EndSwitch
WEnd
EndFunc

Edit: Changed labels from confusing terms like "Host is offline" to "Available". It makes more sense. Plus, I found a few bugs and fixed them. New code below:

#include <File.au3>
#include <Array.au3>
#include <INet.au3>
#include <GUIConstants.au3>
#include <GuiComboBox.au3>
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <WindowsConstants.au3>

Global $selectedIP, $errorCode = 0, $available, $availableIPOnly, $begin, $end, $errorLabel, $tempIpAddress = "", $count = 0, $outputIP = "", $outputIPOnly, $leftSide

If @IPAddress1 <> "0.0.0.0" Then
    $tempIpAddress = "Adapter #1: " & @IPAddress1
    $selectedIP = @IPAddress1
    $count = $count + 1
EndIf

If @IPAddress2 <> "0.0.0.0" Then
    $tempIpAddress = $tempIpAddress & "|" & "Adapter #2: " & @IPAddress2
    $selectedIP = @IPAddress2
    $count = $count + 1
EndIf

If @IPAddress3 <> "0.0.0.0" Then
    $tempIpAddress = $tempIpAddress & "|" & "Adapter #3: " & @IPAddress3
    $selectedIP = @IPAddress3
    $count = $count + 1
EndIf

If @IPAddress4 <> "0.0.0.0" Then
    $tempIpAddress = $tempIpAddress & "|" & "Adapter #4: " & @IPAddress4
    $selectedIP = @IPAddress3
    $count = $count + 1
EndIf

If $count > 1 Then
    $initialGUI = GUICreate("Select the IP range", 330, 87)
    $Label = GUICtrlCreateLabel("What network adapter do you want to use?", 24, 8, 209, 17)
    $IPCombo = GUICtrlCreateCombo("", 24, 40, 200, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
    GUICtrlSetData($IPCombo, $tempIpAddress)
    $Go = GUICtrlCreateButton("Go", 240, 40, 59, 25, 0)
    GUISetState(@SW_SHOW)

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                Exit
            Case $Go
                $selectedIP = GUICtrlRead($IPCombo)
                If $selectedIP = "" Then
                    MsgBox(0, "Error", "You must make a selection from the drop-down list.")
                Else
                    GUIDelete($initialGUI)
                    ExitLoop
                Endif
        EndSwitch
    WEnd
EndIf

If StringInStr($selectedIP, @IPAddress1) Then
    $selectedIP = @IPAddress1
ElseIf StringInStr($selectedIP, @IPAddress2) Then
    $selectedIP = @IPAddress2
ElseIf StringInStr($selectedIP, @IPAddress3) Then
    $selectedIP = @IPAddress3
ElseIf StringInStr($selectedIP, @IPAddress3) Then
    $selectedIP = @IPAddress3
EndIf

$ipAddress = StringSplit($selectedIP, ".")

$mainGUI = GUICreate("Available IPs .: www.fusionsolid.com", 450, 130)
$Label1 = GUICtrlCreateLabel("Enter IP Address Range", 16, 8, 170, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("From:", 24, 40, 30, 17)
$iOct1 = GUICtrlCreateInput($ipAddress[1], 24, 64, 33, 21)
GUICtrlSetState($iOct1, $GUI_DISABLE)
$iOct2 = GUICtrlCreateInput($ipAddress[2], 64, 64, 33, 21)
GUICtrlSetState($iOct2, $GUI_DISABLE)
$iOct3 = GUICtrlCreateInput($ipAddress[3], 104, 64, 33, 21)
GUICtrlSetState($iOct3, $GUI_DISABLE)
$iOct4 = GUICtrlCreateInput("", 144, 64, 33, 21)
GUICtrlSetTip($iOct4, "Must be a number between 1 and 253.")
GUICtrlSetLimit($iOct4, 3)
GUICtrlSetState($iOct4, $GUI_FOCUS)
$fLabel = GUICtrlCreateLabel("To:", 216, 40, 20, 17)
$fOct4 = GUICtrlCreateInput("", 216, 64, 33, 21)
GUICtrlSetTip($fOct4, "Must be a number between 1 and 254.")
GUICtrlSetLimit($fOct4, 3)
$Button1 = GUICtrlCreateButton("Find Available IP Addresses", 280, 8, 155, 41, 0)
$Combo1 = GUICtrlCreateCombo("10", 352, 64, 65, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
GUICtrlSetTip($Combo1, "A higher value may (or may not) give more accurate results. But it will run slower.")
GUICtrlSetData($Combo1, "100|1000|2000|4000|8000", "10")
$Label4 = GUICtrlCreateLabel("Timeout [ms]", 280, 64, 64, 17)
GUICtrlSetTip($Label4, "A higher value may (or may not) give more accurate results. But it will run slower.")
$Label3 = GUICtrlCreateLabel("-", 193, 60, 12, 23)
GUICtrlSetFont(-1, 18, 400, 0, "Arial")
$Checkbox1 = GUICtrlCreateCheckbox("Show Unavailable IPs", 280, 107, 120, 17)
GUICtrlSetTip($Checkbox1, 'Unavailable IPs will be listed as "This IP address is in use"')
$fusionSolid = GUICtrlCreateLabel("www.fusionsolid.com", 22, 110, 150, 17)
GUICtrlSetColor($fusionSolid, 0x0033ff)
GUICtrlSetCursor ($fusionSolid, 0)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            _BeginPing()
        Case $fusionSolid
            ShellExecute("http://www.fusionsolid.com")
    EndSwitch
WEnd

Func _BeginPing()
    $outputIP = ""
    GUICtrlSetBkColor($iOct4, 0xffffff)
    GUICtrlSetBkColor($fOct4, 0xffffff)
    GUICtrlDelete($errorLabel)
    _ErrorCheck()
    If $errorCode = 0 Then
        GUISetState(@SW_DISABLE, $mainGUI)
        $baseAddress = GUICtrlRead($iOct1) & "." & GUICtrlRead($iOct2) & "." & GUICtrlRead($iOct3) & "."
        $j = 0
        $k = 0
        $timeout = GUICtrlRead($Combo1)
        ProgressOn("Scanning for available IP addresses", "Progress")
        Dim $available[1], $availableIPOnly[1]
        $cycle = $end - $begin
        For $i = $begin To $end Step 1
            Ping($baseAddress & $i, $timeout)
            If @error Then
                If @error = 1 Then
                    $errorMsg = "Available"
                ElseIf $errorMsg = 2 Then
                    $errorMsg = "Available"
                ElseIf $errorMsg = 3 Then
                    $errorMsg = "Bad destination"
                Else
                    $errorMsg = "Misc error reaching destination"
                EndIf
                $available[$j] = $baseAddress & $i & " - " & $errorMsg
                $availableIPOnly[$j] = $baseAddress & $i
                $j += 1
                ReDim $available[$j + 1]
                ReDim $availableIPOnly[$j + 1]
            EndIf
            If NOT @error AND GUICtrlRead($Checkbox1) = 1 Then
                $available[$j] = $baseAddress & $i & " - " & "This IP address is in use"
                $availableIPOnly[$j] = $baseAddress & $i
                $j += 1
                ReDim $available[$j + 1]
                ReDim $availableIPOnly[$j + 1]
            EndIf
            ProgressSet(100 / $cycle * $k)
            $k += 1
        Next
        ProgressOff()
        GUISetState($mainGUI, @SW_ENABLE)

        $arraySize = UBound($available)
        If $available[$arraySize - 1] = "" Then
            ReDim $available[$arraySize - 1]
        EndIf

        $arraySize = UBound($availableIPOnly)
        If $availableIPOnly[$arraySize - 1] = "" Then
            ReDim $availableIPOnly[$arraySize - 1]
        EndIf
        GUISetState(@SW_ENABLE, $mainGUI)
        _OutputWindow()
    EndIf
EndFunc   ;==>_BeginPing

Func _ErrorCheck()
    $errorCode = 0
    $begin = Number(GUICtrlRead($iOct4))
    $end = Number(GUICtrlRead($fOct4))
    If $begin < 1 Or $begin > 253 Or IsInt($begin) = 0 Then
        GUICtrlSetBkColor($iOct4, 0xffff33)
        $errorLabel = GUICtrlCreateLabel("The highlighted item (starting value) must be a number between 1 and 253", 24, 90, 376, 17)
        GUICtrlSetColor(-1, 0xFF0000)
        GUICtrlSetState($iOct4, $GUI_FOCUS)
        $errorCode = 1
    ElseIf $end < 1 Or $end > 254 Or IsInt($end) = 0 Then
        GUICtrlSetBkColor($fOct4, 0xffff33)
        $errorLabel = GUICtrlCreateLabel("The highlighted item (ending value) must be a number between 1 and 254", 24, 90, 376, 17)
        GUICtrlSetColor(-1, 0xFF0000)
        GUICtrlSetState($fOct4, $GUI_FOCUS)
        $errorCode = 1
    ElseIf $end < $begin Then
        GUICtrlSetBkColor($iOct4, 0xffffff)
        GUICtrlSetBkColor($fOct4, 0xffffff)
        GUICtrlDelete($errorLabel)
        $errorLabel = GUICtrlCreateLabel("The starting value (From) must be lower than the ending value (To)", 24, 90, 376, 17)
        GUICtrlSetColor(-1, 0xFF0000)
        GUICtrlSetState($iOct4, $GUI_FOCUS)
        GUICtrlSetBkColor($fOct4, 0xffff33)
        GUICtrlSetBkColor($iOct4, 0xffff33)
        $errorCode = 1
    ElseIf $end = $begin Then
        GUICtrlSetBkColor($iOct4, 0xffffff)
        GUICtrlSetBkColor($fOct4, 0xffffff)
        GUICtrlDelete($errorLabel)
        $errorLabel = GUICtrlCreateLabel("The starting value (From) must be lower than the ending value (To)", 24, 90, 376, 17)
        GUICtrlSetColor(-1, 0xFF0000)
        GUICtrlSetState($iOct4, $GUI_FOCUS)
        GUICtrlSetBkColor($fOct4, 0xffff33)
        GUICtrlSetBkColor($iOct4, 0xffff33)
        $errorCode = 1
    EndIf
EndFunc   ;==>_ErrorCheck

Func _OutputWindow()
GUISetState(@SW_DISABLE, $mainGUI)
For $i = 1 to UBound($available) Step 1
    $outputIP = $outputIP & $available[$i - 1] & @CRLF
Next

$outputWindow = GUICreate("Available IP Addresses", 425, 441)
$outputDataWindow = GUICtrlCreateEdit("", 8, 8, 409, 393)
GUICtrlSetState(-1, $GUI_FOCUS)
GUICtrlSetData($outputDataWindow, $outputIP)
$copyIPOnly = GUICtrlCreateButton("Copy IP Addresses Only", 8, 408, 203, 25)
$copyIPAndCode = GUICtrlCreateButton("Copy IP Addresses And Codes", 216, 408, 203, 25)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            GUISetState(@SW_ENABLE, $mainGUI)
            GUIDelete($outputWindow)
            ExitLoop
        Case $copyIPOnly
            $outputIP = ""
            For $i = 1 to UBound($available) Step 1
                $outputIP = $outputIP & $availableIPOnly[$i - 1] & @CRLF
            Next
            ClipPut($outputIP)
            GUISetState(@SW_ENABLE, $mainGUI)
            GUIDelete($outputWindow)
            ExitLoop
        Case $copyIPAndCode
            $outputIP = ""
            $outputIP = GUICtrlRead($outputDataWindow)
            ClipPut($outputIP)
            GUISetState(@SW_ENABLE, $mainGUI)
            GUIDelete($outputWindow)
            ExitLoop
    EndSwitch
WEnd
EndFunc
Edited by sleepydvdr

#include <ByteMe.au3>

Share this post


Link to post
Share on other sites



When you don't get a reply from a ping it doesn't mean that the host is offline. :graduated:

Why can I not ping ip addresses outside my ip range?

Nice small app!

I wrote something similar ->

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

When you don't get a reply from a ping it doesn't mean that the host is offline. :graduated:

Why can I not ping ip addresses outside my ip range?

Nice small app!

I wrote something similar ->

Br,

UEZ

I used the error return codes right from AutoIt to let the user know the status. I don't really know the difference between "host offline" and "unreachable". I assume it may have something to do with how many hops were made or PTR records. Either way, I thought it would be better to tell the user the reason why the address did not ping rather than group all of them together without explanation.

At first, I almost allowed the user to put in any numbers that they wanted. But error checking for all that would be a nightmare. Also, I thought it would be nice to already give the user his/her own first three octets, to save some typing.

I took a look at your script and (of course), it is incredible. I like how you streamed the bmps into the code. I need to learn more about doing that. Very cool app that you made!

Edited by sleepydvdr

#include <ByteMe.au3>

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I took a look at your script and (of course), it is incredible. I like how you streamed the bmps into the code. I need to learn more about doing that. Very cool app that you made!

I wouldn't say it is incredible - maybe useful only! :graduated:

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0