#include <GuiConstants.au3>
#include <GuiIPAddress.au3>
#include <WindowsConstants.au3>
Opt("MustDeclareVars", 1)
test()
Func test()
Local $hgui, $nMsg, $iBtn_Get, $hIPAddress
$hgui = GUICreate("IP Address Control Example", 500, 150)
Local $hIPAddress = _GUICtrlIpAddress_Create($hgui, 10, 10, 200, 20)
_GUICtrlIpAddress_Set($hIPAddress, @IPAddress1)
$iBtn_Get = GUICtrlCreateButton("Get IP", 220, 10, 75, 20)
GUICtrlCreateInput("1234 1234 1234 1234 1234", 10, 40, 200)
GUICtrlCreateButton("Get USPS", 220, 40, 75, 20)
GUICtrlCreateInput("1234 1234 1234 1234 1234 12", 10, 70, 200)
GUICtrlCreateButton("Get USPS", 220, 70, 75, 20)
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
GUIDelete($hgui)
ExitLoop
Case $iBtn_Get
Local $sIP = _GUICtrlIpAddress_Get($hIPAddress)
MsgBox(4160, "Information", "IP Address entered: " & $sIP)
EndSwitch
WEnd
EndFunc ;==>test
I'd like to have an input control that behaves like the one for IPv4 ( grouping the octets ) grouping the 4 symbols of the number and the optional 2 at the end. Because the number can be 20 or 22 char long.
Help