Jump to content

Recommended Posts

Posted

After my first script in which water helped a great deal...thanks water! I decided to try and expand my knowledge and write a script that will further enahnce the one previous. this time i am attempting to make it look pretty. so here goes.

Global $uName, $uPass, $uServer

Getlogin()
;RemedyLogin()


Func GetLogin()
    Local $IUserName, $msg, $Sub_Button, $No_Sub    
        
    GUICreate("Enter Username...", 250, 80)
    GUISetState(@SW_SHOW)
    $IUserName = GUICtrlCreateInput("", 70, 10, 170, 20)
    $Sub_Button = GUICtrlCreateButton("Submit", 55, 50, 100)
    $No_Sub = GUICtrlCreateButton("Cancel", 190, 50, 50)
    GUICtrlCreateLabel("Username:", 10, 10)
    GUISetState()
    
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg = $Sub_Button
                $uName = $IUserName
                MsgBox(0, 'Testing', $uName)
            Case $msg = $No_Sub
                ExitLoop
        EndSelect
    WEnd

EndFunc

Works sort of. I get the nice pop up window and the buttons work, however I have been trying to get the local variable in the function to be set to a global one so i can use it in another function.

Right now it returns "3"

What am i doin wrong?

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
  • Recently Browsing   0 members

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