Please guys how i can make Stop / Start in Same Button in Koda form design
and programed it to work with my bot code
and programed it to work with my bot code
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Bot", 298, 89, 192, 124)
$Start = GUICtrlCreateButton("Start", 32, 24, 97, 33)
$Stop = GUICtrlCreateButton("Stop", 155, 24, 97, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Start
AdlibRegister("code")
Case $Stop
AdlibUnRegister("code")
EndSwitch
WEnd
Func Code()
; your code here
EndFunc
#include <GUIConstantsEx.au3>
$Form1 = GUICreate("uq0w", 270, 148, 192, 124)
$Button1 = GUICtrlCreateButton("Start", 8, 8, 75, 25)
$Button2 = GUICtrlCreateButton("Stop", 8, 8, 75, 25)
GUISetState(@SW_SHOW)
GUICtrlSetState($button2, $GUI_HIDE)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $button1
GUICtrlSetState($button1, $GUI_HIDE)
GUICtrlSetState($button2, $GUI_SHOW)
Case $button2
GUICtrlSetState($button1, $GUI_SHOW)
GUICtrlSetState($button2, $GUI_HIDE)
EndSwitch
WEnd