realkiller Posted August 14, 2007 Posted August 14, 2007 i wanna make a ip to name converter so far i don't get any result i know i have done something wrong. expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.4.7 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <array.au3> #include <inet.au3> #include <GUIConstants.au3> Dim $aResult, $sIp, $ip, $sIps GUICreate("IP 2 Computername") ; will create a dialog box that when displayed is centered $sIp = GUICtrlCreateInput ( "", 10, 5, 300, 20) $ip = GUICtrlCreateButton ("Search", 10, 30, 100) $sIps = "" TCPStartup() $aResult = _TCPIpToName ($sIp, 1) If @error Then MsgBox(0, "_TCPIpToName()", "@error = " & @error & @LF & "@extended = " & @extended) Else _ArrayDisplay($aResult, "Local Hostname(s)") EndIf GUISetState (@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ip $sIps = GUICtrlRead($sIp) EndSelect Wend Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2
realkiller Posted August 14, 2007 Author Posted August 14, 2007 got it expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.4.7 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <array.au3> #include <inet.au3> #include <GUIConstants.au3> Dim $aResult, $sIp, $ip, $sIps GUICreate("IP 2 Computername") ; will create a dialog box that when displayed is centered $sIp = GUICtrlCreateInput ( "", 10, 5, 300, 20) $ip = GUICtrlCreateButton ("Search", 10, 30, 100) GUISetState (@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ip TCPStartup() $aResult = _TCPIpToName (GUICtrlRead($sIp), 1) If @error Then MsgBox(0, "_TCPIpToName()", "@error = " & @error & @LF & "@extended = " & @extended) Else _ArrayDisplay($aResult, "Local Hostname(s)") EndIf EndSelect Wend Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now