Mack Posted September 2, 2005 Share Posted September 2, 2005 #include <GUIConstants.au3> GUICtrlCreateLabel ( "my label which will split on several lines", 10,20, 100, 100) GUICreate("Test" ,300,173 ,$WS_EX_WINDOWEDGE) GUICtrlCreatePic ("BG.jpg", 0, 0, 300, 173) GUICtrlSetState (-1, $GUI_DISABLE) GUISetState (@SW_SHOW) $P = GUICtrlCreateButton ("Test", 5, 145 , 60) if $P MsgBox("Test" , "Test") ; Run the GUI until the dialog is closed While 1 $Msg = GUIGetMsg() If $Msg = $GUI_EVENT_CLOSE Then ExitLoop Wend There is something wrong with this script, but what? Link to comment Share on other sites More sharing options...
Valuater Posted September 2, 2005 Share Posted September 2, 2005 more like this ??? #include <GUIConstants.au3> GUICreate("Test" ,300,173 ,$WS_EX_WINDOWEDGE) GUICtrlCreateLabel ( "my label which will split on several lines", 10,20, 100, 100) GUICtrlCreatePic ("BG.jpg", 0, 0, 300, 173) GUICtrlSetState (-1, $GUI_DISABLE) GUISetState (@SW_SHOW) $P = GUICtrlCreateButton ("Test", 5, 145 , 60) ; Run the GUI until the dialog is closed While 1 $Msg = GUIGetMsg() If $Msg = $P Then MsgBox(0,"Test" , "Test") EndIf If $Msg = $GUI_EVENT_CLOSE Then ExitLoop Wend hope that helps 8) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 2, 2005 Moderators Share Posted September 2, 2005 Not that this has any relevance... but why would you set $P = GUICtrlCreateButton ("Test", 5, 145 , 60) after the GuiSetState()? Just like to see the button fly in ? 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. Link to comment Share on other sites More sharing options...
Valuater Posted September 2, 2005 Share Posted September 2, 2005 Not that this has any relevance... but why would you set $P = GUICtrlCreateButton ("Test", 5, 145 , 60) after the GuiSetState()? Just like to see the button fly in ?<{POST_SNAPBACK}>OOOPS... I missed that onethere were so many errors, i just kept testing until it worked#include <GUIConstants.au3> GUICreate("Test" ,300,173 ,$WS_EX_WINDOWEDGE) GUICtrlCreateLabel ( "my label which will split on several lines", 10,20, 100, 100) GUICtrlCreatePic ("BG.jpg", 0, 0, 300, 173) GUICtrlSetState (-1, $GUI_DISABLE) $P = GUICtrlCreateButton ("Test", 5, 145 , 60) GUISetState (@SW_SHOW) ; Run the GUI until the dialog is closed While 1 $Msg = GUIGetMsg() If $Msg = $P Then MsgBox(0,"Test" , "Test") EndIf If $Msg = $GUI_EVENT_CLOSE Then ExitLoop Wendthx8) 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