unclesam 0 Report post Posted February 26, 2008 i create a simple GUI GUICreate("GUI") GUICtrlCreateLabel("Test script", 10, 10) $OK = GUICtrlCreateButton("OK", 10,40, 70, 25, -1) GUISetState (@SW_SHOW) ControlFocus("GUI", "", 3) While 1 $msg = GUIGetMsg() If $msg = $OK Then ExitLoop Wend with the AutoIT v3.1.1.0 run the script fine - e.g. press any keys but the gui runs when the script runs with v3.2.4.10 and press key "enter" the gui closed is that a bug or feature ? Share this post Link to post Share on other sites
Xenobiologist 35 Report post Posted February 26, 2008 Hi, run it this way: #include<GUIConstantsEx.au3> GUICreate("GUI") GUICtrlCreateLabel("Test script", 10, 10) GUICtrlSetState(-1, $GUI_FOCUS) $OK = GUICtrlCreateButton("OK", 10, 40, 70, 25, -1) GUISetState(@SW_SHOW) ControlFocus("GUI", "", 3) While 1 $msg = GUIGetMsg() If $msg = $OK Then ExitLoop WEnd Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Share this post Link to post Share on other sites