Muchuchu Posted April 27, 2008 Share Posted April 27, 2008 I want a message box to pop up once i hit the pop buttonv ($popbut) but i can't quite seem to figure out why it won't. I must be doing something wrong expandcollapse popup#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Autoit Program Test", 200, 200, 180, 100) $Label1 = GUICtrlCreateLabel("Press ESCAPE to start!", 20, 15, 120, 15) $Label2 = GUICtrlCreateLabel("Press BACKSPACE to exit!", 20, 120, 140, 15) $Connect = GUICtrlCreateButton("Pick Color!",20, 35, 55, 20) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $hexColor=GUICtrlCreateInput("", 80, 60, 90, 20,$ES_READONLY) GUICtrlCreateLabel("Color:", 20, 85) GUICtrlCreateLabel("Color Code", 20, 60) $MostrarColor=GUICtrlCreateLabel("", 80, 85, 90, 20,$ES_READONLY) GUICtrlCreateLabel("Press Pause/Break to freeze color.", 0, 140 ,200, 15, $SS_CENTER) GUICtrlSetColor(-1,0x00808080) $popbut = GUICtrlCreateButton("Pop",20, 160, 55, 20) GUISetState() While 1 $msg=GUIGetMsg() Select Case $msg=$GUI_EVENT_CLOSE exit EndSelect WEnd while 1 $msg = GUIGetMsg() if $msg = $popbut then msgbox(1,"22333","3434") Endif WEnd Link to comment Share on other sites More sharing options...
flip209 Posted April 27, 2008 Share Posted April 27, 2008 #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Autoit Program Test", 200, 200, 180, 100) $Label1 = GUICtrlCreateLabel("Press ESCAPE to start!", 20, 15, 120, 15) $Label2 = GUICtrlCreateLabel("Press BACKSPACE to exit!", 20, 120, 140, 15) $Connect = GUICtrlCreateButton("Pick Color!",20, 35, 55, 20) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $hexColor=GUICtrlCreateInput("", 80, 60, 90, 20,$ES_READONLY) GUICtrlCreateLabel("Color:", 20, 85) GUICtrlCreateLabel("Color Code", 20, 60) $MostrarColor=GUICtrlCreateLabel("", 80, 85, 90, 20,$ES_READONLY) GUICtrlCreateLabel("Press Pause/Break to freeze color.", 0, 140 ,200, 15, $SS_CENTER) GUICtrlSetColor(-1,0x00808080) $popbut = GUICtrlCreateButton("Pop",20, 160, 55, 20) GUISetState() While 1 $msg=GUIGetMsg() Select Case $msg=$GUI_EVENT_CLOSE exit case $msg=$popbut MsgBox(0,"","") EndSelect WEnd while 1 $msg = GUIGetMsg() if $msg = $popbut then msgbox(1,"22333","3434") Endif WEnd " I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln Link to comment Share on other sites More sharing options...
Muchuchu Posted April 27, 2008 Author Share Posted April 27, 2008 Thanks I got it to work with that. 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