netegg Posted February 10, 2009 Share Posted February 10, 2009 Does anybody know how to set an ipaddress control on a tabsheet? Link to comment Share on other sites More sharing options...
BrettF Posted February 10, 2009 Share Posted February 10, 2009 (edited) Any chance of some more details? have you tried ControlSend? Cheers, Brett EDIT: Here you go! I used this as my GUI with the IP address control. #include <GuiConstantsEx.au3> #include <GuiIPAddress.au3> Opt("MustDeclareVars", 1) $Debug_IP = False; Check ClassName being passed to IPAddress functions, set to True and use a handle to another control to see it work _Main() Func _Main() Local $hgui, $hIPAddress $hgui = GUICreate("IP Address Control Set (String) Example", 400, 300) $hIPAddress = _GUICtrlIpAddress_Create($hgui, 10, 10) GUISetState(@SW_SHOW) ;_GUICtrlIpAddress_Set ($hIPAddress, "24.168.2.128") ;MsgBox (4160, "Information", "IP Address: " & _GUICtrlIpAddress_Get($hIPAddress)) ; Wait for user to close GUI Do Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>_Main And this is how I set the text: $title = "IP Address Control Set (String) Example" $hnd = ControlGetHandle ($title, "", "[CLASS:SysIPAddress32; INSTANCE:1]") $ret = ControlSetText ($title, "", $hnd, "24.168.2.128") Use the AutoIt Window Info tool on the control to get the required parts for the commands. Edited February 10, 2009 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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