Question

03/03/2017 10:48 elwany#1
Please guys how i can make Stop / Start in Same Button in Koda form design

and programed it to work with my bot code
03/03/2017 10:52 TheMokkо#2
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
(You don't need a while 1 loop anymore because adlibregister will loop the function already.)
03/03/2017 12:44 HaMaDa..#3
I already helped you on the S4 league section.
03/03/2017 15:22 gοd#4
How about actually trying to understand the shit instead of just copying stuff together and hope it will work?
03/03/2017 21:42 xKemya#5
Code:
#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
This is simple shit... I assume you are working on a c&p project.
03/04/2017 19:14 K1ramoX#6
[Only registered and activated users can see links. Click Here To Register...]

closed