|
You last visited: Today at 14:17
Advertisement
Question
Discussion on Question within the S4 League forum part of the Shooter category.
03/03/2017, 10:48
|
#1
|
elite*gold: 0
Join Date: Dec 2013
Posts: 153
Received Thanks: 17
|
Question
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
|
#2
|
elite*gold: 111
Join Date: Aug 2016
Posts: 418
Received Thanks: 758
|
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
|
#3
|
elite*gold: 37
Join Date: May 2014
Posts: 1,835
Received Thanks: 9,833
|
I already helped you on the S4 league section.
|
|
|
03/03/2017, 15:22
|
#4
|
elite*gold: 39
Join Date: Jun 2016
Posts: 269
Received Thanks: 805
|
How about actually trying to understand the **** instead of just copying stuff together and hope it will work?
|
|
|
03/03/2017, 21:42
|
#5
|
elite*gold: 0
Join Date: Jan 2013
Posts: 2,450
Received Thanks: 1,880
|
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 ****... I assume you are working on a c&p project.
|
|
|
03/04/2017, 19:14
|
#6
|
elite*gold: 26
Join Date: Jan 2012
Posts: 3,474
Received Thanks: 18,844
|
closed
|
|
|
All times are GMT +1. The time now is 14:18.
|
|