Rahul Rohela Posted November 15, 2005 Share Posted November 15, 2005 HI, I want to create input box to enter IP.. Just same as any other IP input box that we use with windows. This box will not accespt number grate than 255 & to work same as we found on any window aplication that is using IP address.. Like IP scanners. Please help.... Thx Link to comment Share on other sites More sharing options...
kpu Posted November 15, 2005 Share Posted November 15, 2005 I'm sure there is a better way to do this and I'm no programmer. So let me just get that out there first. This should be what your looking for though. expandcollapse popup#include <GuiConstants.au3> If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("Form2", 310, 76, 430,346 ,BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Edit1 = GuiCtrlCreateInput("256", 8, 8, 41, 21) GUICtrlSetLimit($Edit1,3) $Edit2 = GuiCtrlCreateInput("20", 56, 8, 41, 21) GUICtrlSetLimit($Edit2,3) $Edit3 = GuiCtrlCreateInput("30", 104, 8, 41, 21) GUICtrlSetLimit($Edit3,3) $Edit4 = GuiCtrlCreateInput("100", 152, 8, 41, 21) GUICtrlSetLimit($Edit4,3) $Button1 = GuiCtrlCreateButton("Button1", 216, 8, 65, 25) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $Button1 $ip1 = GUICtrlRead($Edit1) $ip2 = GUICtrlRead($Edit2) $ip3 = GUICtrlRead($edit3) $ip4 = GUICtrlRead($Edit4) $string = $ip1 & "." & $ip2 & "." & $ip3 & "." & $ip4 _IPerrorCtrl() Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit Func _IPerrorCtrl() If $ip1 > 255 Then MsgBox(16,"Warning!","Number be must be lower then 255") GUICtrlSetData($Edit1,"0") ElseIf $ip2 > 255 Then MsgBox(16,"Warning!","Number be must be lower then 255") GUICtrlSetData($Edit1,"0") ElseIf $ip3 > 255 Then MsgBox(16,"Warning!","Number be must be lower then 255") GUICtrlSetData($Edit1,"0") ElseIf $ip4 > 255 Then MsgBox(16,"Warning!","Number be must be lower then 255") GUICtrlSetData($Edit1,"0") Else Msgbox(32,"",$string) ;RunCommand Here EndIf EndFunc http://www.kpunderground.com Link to comment Share on other sites More sharing options...
CyberSlug Posted November 15, 2005 Share Posted November 15, 2005 (edited) Might help, but I don't know how easy it is to integrate into projects:http://www.autoitscript.com/forum/index.ph...7855&hl=addressIn fact, it seems the Func Dot() doesn't work right in the current version of AutoIt.... Edited November 15, 2005 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
w0uter Posted November 15, 2005 Share Posted November 15, 2005 (edited) i remember something about larry cyber embedding a sys control. Edited November 15, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
CyberSlug Posted November 15, 2005 Share Posted November 15, 2005 Bookmark Lazycat's site. He has a lot of useful DLLs and UDFs. His SysIPAddress implementation would make a good addition to AutoIt's beta UDF collection. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Rahul Rohela Posted November 16, 2005 Author Share Posted November 16, 2005 (edited) HI,Thx for reply.. CyberSlug Posted Yesterday, 08:55 PM Might help, but I don't know how easy it is to integrate into projects:http://www.autoitscript.com/forum/index.ph...7855&hl=addressIn fact, it seems the Func Dot() doesn't work right in the current version of AutoIt....This is 100% close to my Query...But problem is its not working with TAB or when we press "." Any suggestions to resolve this???Thx Edited November 16, 2005 by Rahul Rohela Link to comment Share on other sites More sharing options...
Rahul Rohela Posted November 16, 2005 Author Share Posted November 16, 2005 Larry Posted Yesterday, 09:09 PM http://www.autoitscript.com/forum/index.ph...indpost&p=82741 ://http://www.autoitscript.com/forum/i...ndpost&p=82741 ://http://www.autoitscript.com/forum/i...ndpost&p=82741 ://http://www.autoitscript.com/forum/i...ndpost&p=82741 ://http://www.autoitscript.com/forum/i...ndpost&p=82741 ://http://www.autoitscript.com/forum/i...ndpost&p=82741 ://http://www.autoitscript.com/forum/i...ndpost&p=82741 Larry.. Its not working for me.. No field is there to enter IP & on using its functions is showing IP 0.0.0.0Please help.. 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