Hi everybody I'm trying to make a bot for S4 League, but I have some problems, here it is my code:
I need that if I Press:
-Z it activare Function Say
-X it close application
-C it clicks the target
But it doesn't work... What's the problem?
Code:
HotKeySet("{X}", "Terminate")
Func Terminate()
Exit 0
EndFunc
HotKeySet("{Z}", "Say")
Func Say()
While 1
Send ("{ENTER}")
Send ("Asd")
Send ("{ENTER}")
Sleep(10000)
WEnd
EndFunc
HotKeySet("{C}", "Click")
Func Click()
MouseClick("left", 511, 697)
Sleep(5000)
EndFunc
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Bot v1.0", 210, 74, 302, 218)
GUISetBkColor(0x000000)
$Button1 = GUICtrlCreateButton("Info", 56, 8, 97, 25, $WS_GROUP)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x3399FF)
$Button2 = GUICtrlCreateButton("Esci", 56, 40, 97, 25, $WS_GROUP)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x3399FF)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
WHILE 3
$NMSG=GUIGETMSG()
SWITCH $NMSG
CASE $Button1
MsgBox(0,"Info","Bot By User198")
CASE $Button2
Exit
EndSwitch
WEnd
-Z it activare Function Say
-X it close application
-C it clicks the target
But it doesn't work... What's the problem?