Jump to content

HTML format like form


usera
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

#include <ByteMe.au3>

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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)

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...