mrnoob Posted July 30, 2005 Share Posted July 30, 2005 (edited) I'm making a simple program to login into a game (just for practice). On line 13, when the InputBox is created, I need a way to use the "Ok" button on it. Instead of having the window simply close when ok is pressed, I want to do something else. I'm sure this is simply but I just cant figure it out #include <GUIConstants.au3> GUICreate("", 250, 65) GUICtrlCreateInput("Username", 50, 5, 150 , 20) GUISetState(@SW_SHOW) $okbutton = GUICtrlCreateButton("OK", 100, 35, 60) While 1 $msg = GUIGetMsg() Select Case $msg = $okbutton InputBox("", "","Password","", 150, 20) Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Edited July 30, 2005 by mrnoob Link to comment Share on other sites More sharing options...
GaryFrost Posted July 30, 2005 Share Posted July 30, 2005 create your own input box: Example: expandcollapse popup#include <GuiConstants.au3> $main = GUICreate("MyGUI", 392, 322) $Button_1 = GUICtrlCreateButton("Input", 140, 190, 70, 30) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 GUISetState(@SW_DISABLE, $main) _Input() GUISetState(@SW_ENABLE, $main) GUISetState(@SW_SHOW) Case Else ;;; EndSelect WEnd Exit Func _Input() $popup = GUICreate("PopUP", 191, 85, -1, -1, $WS_DLGFRAME, $WS_EX_TOPMOST) $Input_1 = GUICtrlCreateInput("Input1", 0, 0, 180, 20) $Button_2 = GUICtrlCreateButton("OK", 60, 40, 60, 20) GUISetState() While 1 $msg2 = GUIGetMsg() Select Case $msg2 = $Button_2 ExitLoop Case Else ;;; EndSelect WEnd GUIDelete($popup) EndFunc ;==>_Input SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now