Goldenmite Posted March 10, 2006 Posted March 10, 2006 I made a simple gui and I want to know how to read the input box so that when I press a button it will run what is in the inputbox. #include <GUIConstants.au3> $Form1 = GUICreate("launch test", 307, 372, 237, 256) $Input1 = GUICtrlCreateInput("Path of file", 32, 272, 233, 21, -1, $WS_EX_CLIENTEDGE) ;Create a button $Button1 = GUICtrlCreateButton("Launch", 192, 328, 75, 25) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else EndSelect WEnd Exit
Developers Jos Posted March 10, 2006 Developers Posted March 10, 2006 (edited) Case $msg = $Button1 Run(GUICtrlRead($Input1)) Edited March 10, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Moderators SmOke_N Posted March 10, 2006 Moderators Posted March 10, 2006 I made a simple gui and I want to know how to read the input box so that when I press a button it will run what is in the inputbox. #include <GUIConstants.au3> $Form1 = GUICreate("launch test", 307, 372, 237, 256) $Input1 = GUICtrlCreateInput("Path of file", 32, 272, 233, 21, -1, $WS_EX_CLIENTEDGE) ;Create a button $Button1 = GUICtrlCreateButton("Launch", 192, 328, 75, 25) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else EndSelect WEnd Exit$MyInput = GUICtrlRead($Input1) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Goldenmite Posted March 10, 2006 Author Posted March 10, 2006 Thank you JdeB and SmOke_N for all the help. Ive got it working now .
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