Jump to content

Input Boxes


gleem
 Share

Recommended Posts

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

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 guictrlsetdata

EXAMPLE:

$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

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 by Valuater

NEWHeader1.png

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...