Jump to content

Gui will not let me click next


firman
 Share

Recommended Posts

This gui with the code listed below, will not let me click the NEXT button with the mouse, but if I tab to it and use enter it works... Any ideas on what is wrong?

#include <GUIConstants.au3>
FileInstall("\\dell06\installs\logoarc\arc.jpg", "\\dell06\pc_setup\testing\welcome_screen.au3")

GUICreate("Computer Information", 400, 200) 

; Developed and Maintained by Matt Firman & Ricardo Chavez for Arc-International North America - matthew.firman@arc-intl.com, ricardo.chavez@arc-intl.com

;UserName and Input
GUICtrlCreateLabel ("UserName:", 10,  30, 60, 50)
$username = GUICtrlCreateInput ( "", 70,  30, 150, 20)
GUICtrlCreateLabel ("(ex. Gary Smith = smithg)", 230,  30, 130, 50)
;End of UserName and Input


;Password and Confirm password inputs
GUICtrlCreateLabel ("Password:", 10,  60, 60, 50)
$password = GUICtrlCreateInput ( "", 70,  60, 150, 20, $ES_PASSWORD)
GUICtrlCreateLabel ("Confirm Password:", 10,  90, 60, 50)
$confirm_password = GUICtrlCreateInput ( "", 70, 90, 150, 20, $ES_PASSWORD)
GUICtrlCreateLabel ("Computer Name:", 10,  120, 60, 50)
;End Password and Confirm password inputs

;Computer Name Input
$computer_name = GUICtrlCreateInput ( "", 70,  120, 150, 20)
GUICtrlCreateLabel ("(ex. wnm00013 or pnm00013 )", 230,  120, 180, 50)
;End Computer Name Input

$okbutton = GUICtrlCreateButton("Next", 320, 150, 60)
GUISetState(@SW_SHOW)

While 1
  $msg = GUIGetMsg()

  Select
    Case $msg = $okbutton

            ; Reads User data inputed from the GUI
$username_read = GUICtrlRead($username)
$password_read = GUICtrlRead($password)
$confirm_password_read = GUICtrlRead($confirm_password)
$computer_name_read = GUICtrlRead($computer_name)
;$computer_read = GUICtrlRead($computer)

  If ($password_read == $confirm_password_read) Then
     
     MsgBox(0, "GUI Event", "The installs will now begin")
     
     $user_file = FileOpen("c:\user_data.dat", 1)

If $user_file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf



;Writes username and password to file for later access

FileWrite($user_file, $username_read & @CRLF)
FileWrite($user_file, $password_read & @CRLF)
FileWrite($user_file, $computer_name_read & @CRLF)
;FileWrite($user_file, $computer_read)

FileClose($user_file)
    
;END Writes username and password to file for later access

     
     
     
     
     Else 
    
MsgBox(0, "Password Wrong", "The passwords you entered do not match. Please re-enter them")
         
EndIf
     
Sleep(5000) ;5 seconds


        ; END Reads User data inputed from the GUI

    Case $msg = $GUI_EVENT_CLOSE

     ExitLoop 
  EndSelect
WEnd
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...