Mbell Posted August 8, 2010 Share Posted August 8, 2010 Hi, This is my first post here. Sorry for my poor english.I known autoit from computer book on thailand yesterdayBelow code is my first program that make from my learning on help file.#NoTrayIcon $ip = InputBox("PING IP BY JIRAPATH SSP","ENTER IP") $result = ping ($ip) if $result Then msgbox(0, "STATUS", "PING "&$ip) Else msgbox(0, "STATUS", "NOT PING "&$ip) EndIfI would like to ask your comment to improve belong my idea.1. popup for receive third and fourth number of ip such as 172.30.X.Y. I always use ping ip 172.30....... . so that I want to only enter third number then press enter for next popup for fourth number.my own idea to merge third and fourth number to 172.30. as $ip as above my program. But I can't find function about merge string.2. If I can ping ip, program will show computer name of ping ip such as you use command nbtsta -a ip on cmd command mode.How can I adapt @computerName for my requirement.Thank you for your commentRegards,Mbell Link to comment Share on other sites More sharing options...
4ggr35510n Posted August 8, 2010 Share Posted August 8, 2010 (edited) 0. Use "code" instead of "quote" to post a code fragment. 1. &$var1 = "Welcome" $var2 = "in" $var3 = "Autoit" $var4 = "Forum" MsgBox(0,"",$var1 & $var2 & $var3 & $var4)2. I don't get what u mean Edited August 8, 2010 by 4ggr35510n Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 9, 2010 Share Posted August 9, 2010 You might want to check out the functions of the GuiIPAddress.au3 UDF, especially _GuiCtrlIPAddress_SetRange() and _GuiCtrlIPAddress_Get(): #include <GuiConstantsEx.au3> #include <GuiIPAddress.au3> Global $hgui, $hIPAddress, $idButton, $sIPAdx $hgui = GUICreate("IP Address Control Set Range Example", 300, 150) $hIPAddress = _GUICtrlIpAddress_Create($hgui, 10, 10) $idButton = GUICtrlCreateButton("SELECT", 100, 100, 100, 30) GUISetState(@SW_SHOW) ; set range on 1st two fields _GUICtrlIpAddress_Set($hIPAddress, "172.30.0.0") _GUICtrlIpAddress_SetRange($hIPAddress, 0, 172, 172) _GUICtrlIpAddress_SetRange($hIPAddress, 1, 30, 30) ; GUI message loop While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $idButton $sIPAdx = _GUICtrlIpAddress_Get($hIPAddress) MsgBox(64, "Selected", "Address selected = " & $sIPAdx) EndSwitch WEnd Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
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