lyledg Posted March 16, 2007 Share Posted March 16, 2007 (edited) Hey guys I need to change the function of a button within my script, Like a start and stop button as shown below.. #include <GUIConstants.au3> GUICreate("Test Buttons",220,100, 100,200) $button = GUICtrlCreateButton ("Start",75,70,70,20) GUISetState () do $msg = GUIGetMsg() If $msg = $button Then GUICtrlSetData ($button,"Stop") $m = GUIGetMsg () If $m = -3 Then ExitLoop If $m = $button Then GUICtrlSetData ($button,"Start") EndIf EndIf until $msg = $GUI_EVENT_CLOSE Tried using and editing the example out of the help file for GUICtrlCreateProgress, but am stuck now? Any ideas please? Edited March 16, 2007 by lyledg Link to comment Share on other sites More sharing options...
Valuater Posted March 16, 2007 Share Posted March 16, 2007 Maybe... #include <GUIConstants.au3> GUICreate("Test Buttons", 220, 100, 100, 200) $button = GUICtrlCreateButton("Start", 75, 70, 70, 20) GUISetState() While 1 $msg = GUIGetMsg() If $msg = -3 Then ExitLoop If $msg = $button Then If GUICtrlRead($button) = "Start" Then GUICtrlSetData($button, "Stop") ; do something ???? Else GUICtrlSetData($button, "Start") ; do somethnig EndIf EndIf WEnd 8) Link to comment Share on other sites More sharing options...
lyledg Posted March 16, 2007 Author Share Posted March 16, 2007 Thanks Vaulater, I thought it would something very easy! Link to comment Share on other sites More sharing options...
Valuater Posted March 16, 2007 Share Posted March 16, 2007 Thanks Vaulater, I thought it would something very easy! wELCOME8) 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