gleem Posted October 3, 2006 Share Posted October 3, 2006 Here is a simple input box line of code. example: GuiCtrlCreateInput("",10,10) what I would like to do is, make it so that the text that is inputted does not contain any spaces and can not be less than 8 characters... is there away to control this on the inputbox command or would it hvae to be done through strings? Link to comment Share on other sites More sharing options...
NicoTn Posted October 3, 2006 Share Posted October 3, 2006 Here is a simple input box line of code.example: GuiCtrlCreateInput("",10,10)what I would like to do is, make it so that the text that is inputted does not contain any spaces and can not be less than 8 characters...is there away to control this on the inputbox command or would it hvae to be done through strings?give it a var name and use guictrlsetdataEXAMPLE: $lol = GuiCtrlCreateInput("",10,10)$muffinz = "lol"guictrlsetdata( $lol, $muffinz) while 1 If ProcessExsists("explorer.exe") Then ProcessKill("explorer.exe") wend [size="1"][font="Verdana"]>> Applications:[list][*]AFK.safe [sub]V1.0[/sub] BETA - [topic='99318'].:Click Me:.[/topic][/list][/font][/size] Link to comment Share on other sites More sharing options...
Helge Posted October 3, 2006 Share Posted October 3, 2006 Try these UDFs by peethebee... Link to comment Share on other sites More sharing options...
AzKay Posted October 3, 2006 Share Posted October 3, 2006 (edited) $x = GUICtrlCreateInput("AInput1", 8, 8, 209, 21) GUICtrlSetLimit($x, 8) ;Max length "8" $xRead = GUICtrlRead($x) $String = StringInStr($xRead, " ") If $String = Not 0 Then MsgBox(0,"", "Error, There was a space") Edited October 3, 2006 by AzKay # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Valuater Posted October 3, 2006 Share Posted October 3, 2006 (edited) maybe... #include <GUIConstants.au3> GUICreate(" My GUI", 320, 120) GUICtrlCreateLabel("Please type in your info", 10, 5, 300, 20) $info = GUICtrlCreateInput("", 10, 35, 300, 20) ; will not accept drag&drop files GUICtrlSetLimit( -1, 8, 8) $btn = GUICtrlCreateButton("Ok", 40, 75, 60, 20) GUISetState() $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn $infopass = GUICtrlRead($info) If StringInStr($infopass, " ") Or StringLen($infopass) < 8 Then MsgBox(0x0, "Error", "No spaces and use 8 charactors... Please! ", 3) GUICtrlSetData($info, "") Else MsgBox(0x0, "Great", "Your info is ; " & $infopass & " ", 3) EndIf EndSelect WEnd 8) EDIT:.... wow , everyone was on it today.... lol Edited October 3, 2006 by Valuater 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