Jump to content
Sign in to follow this  
usera

HTML format like form

Recommended Posts

usera

Greeting,

I am looking for a HTML format form to get information.

for example., I want user to input USERNAME, PASSWORD and DOMAIN information then click on GO button, my program continue,

Right now I can get these 3 information each time I use msgbox command, how can I get in one time time HTML form?

Thanks

usera

Share this post


Link to post
Share on other sites
sleepydvdr

Do you mean something like this?

#include <GUIConstants.au3>
 
$Form1 = GUICreate("Form1", 399, 129)
$Label1 = GUICtrlCreateLabel("User Name:", 24, 16, 60, 17)
$Label2 = GUICtrlCreateLabel("Password:", 24, 48, 53, 17)
$Label3 = GUICtrlCreateLabel("Domain:", 24, 80, 43, 17)
$inputUserName = GUICtrlCreateInput("", 88, 16, 169, 21)
$inputPassword = GUICtrlCreateInput("", 88, 48, 169, 21)
$inputDomain = GUICtrlCreateInput("", 88, 80, 169, 21)
$Button1 = GUICtrlCreateButton("Go", 288, 48, 75, 25, 0)
GUISetState(@SW_SHOW)
 
 
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            $userName = GUICtrlRead($inputUserName)
            $password = GUICtrlRead($inputPassword)
            $domain = GUICtrlRead($inputDomain)
            MsgBox(0, "", "You typed in the following information:" & @CRLF & $userName & @CRLF & $password & @CRLF & $domain)
    EndSwitch
WEnd
  • Like 1

#include <ByteMe.au3>

Share this post


Link to post
Share on other sites
usera

Do you mean something like this?

#include <GUIConstants.au3>
 
$Form1 = GUICreate("Form1", 399, 129)
$Label1 = GUICtrlCreateLabel("User Name:", 24, 16, 60, 17)
$Label2 = GUICtrlCreateLabel("Password:", 24, 48, 53, 17)
$Label3 = GUICtrlCreateLabel("Domain:", 24, 80, 43, 17)
$inputUserName = GUICtrlCreateInput("", 88, 16, 169, 21)
$inputPassword = GUICtrlCreateInput("", 88, 48, 169, 21)
$inputDomain = GUICtrlCreateInput("", 88, 80, 169, 21)
$Button1 = GUICtrlCreateButton("Go", 288, 48, 75, 25, 0)
GUISetState(@SW_SHOW)
 
 
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            $userName = GUICtrlRead($inputUserName)
            $password = GUICtrlRead($inputPassword)
            $domain = GUICtrlRead($inputDomain)
            MsgBox(0, "", "You typed in the following information:" & @CRLF & $userName & @CRLF & $password & @CRLF & $domain)
    EndSwitch
WEnd

YES!!! Thank you very very much!

Share this post


Link to post
Share on other sites
usera

Thanks sleepydvdr,

more question is how to show "*****" when some one typing in the password filed? and how to put a "About" button beside the "GO" button, for provide more information,

thanks

user

Do you mean something like this?

#include <GUIConstants.au3>
 
$Form1 = GUICreate("Form1", 399, 129)
$Label1 = GUICtrlCreateLabel("User Name:", 24, 16, 60, 17)
$Label2 = GUICtrlCreateLabel("Password:", 24, 48, 53, 17)
$Label3 = GUICtrlCreateLabel("Domain:", 24, 80, 43, 17)
$inputUserName = GUICtrlCreateInput("", 88, 16, 169, 21)
$inputPassword = GUICtrlCreateInput("", 88, 48, 169, 21)
$inputDomain = GUICtrlCreateInput("", 88, 80, 169, 21)
$Button1 = GUICtrlCreateButton("Go", 288, 48, 75, 25, 0)
GUISetState(@SW_SHOW)
 
 
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            $userName = GUICtrlRead($inputUserName)
            $password = GUICtrlRead($inputPassword)
            $domain = GUICtrlRead($inputDomain)
            MsgBox(0, "", "You typed in the following information:" & @CRLF & $userName & @CRLF & $password & @CRLF & $domain)
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites
sleepydvdr

Easy to fix. Just add to the top of the script:

#Include <EditConstants.au3>

And change this line:

$inputPassword = GUICtrlCreateInput("", 88, 48, 169, 21, $ES_PASSWORD)

#include <ByteMe.au3>

Share this post


Link to post
Share on other sites
usera

Yes, that fixed. again thank you very much.

How to put a "About" button beside the "GO" button, for provide more information, :graduated:

Thanks

usera

Easy to fix. Just add to the top of the script:

#Include <EditConstants.au3>

And change this line:

$inputPassword = GUICtrlCreateInput("", 88, 48, 169, 21, $ES_PASSWORD)

Share this post


Link to post
Share on other sites
usera

Yes, that fixed. again thank you very much.

How to put a "About" button beside the "GO" button, for provide more information, :graduated:

Thanks

usera

figured out, thanks

usera

Share this post


Link to post
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
Sign in to follow this  

×