|
You last visited: Today at 08:57
Advertisement
HELP WITH BOT
Discussion on HELP WITH BOT within the General Coding forum part of the Coders Den category.
05/16/2010, 17:40
|
#1
|
elite*gold: 0
Join Date: Jun 2009
Posts: 203
Received Thanks: 511
|
HELP WITH BOT
Hi everybody I'm trying to make a bot for S4 League, but I have some problems, here it is my code:
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
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?
|
|
|
05/16/2010, 19:35
|
#2
|
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
|
PHP Code:
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3>
HotKeySet("{X}", "Terminate") HotKeySet("{Z}", "Say") HotKeySet("{C}", "Click")
#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 1 $nMsg=GUIGetMsg() Switch = $nMsg Case $Button1 MsgBox(0,"Info","Bot By User198") Case $Button2 Exit EndSwitch WEnd
Func Terminate() Exit EndFunc
Func Say() Send ("{ENTER}") sleep(10) Send ("Asd") sleep(10) Send ("{ENTER}") Sleep(10000) EndFunc
Func Click() MouseClick("left", 511, 697) Sleep(5000) EndFunc
€dit: Gewöhn dir mal nen sauberen Programmierstil an
|
|
|
05/16/2010, 20:22
|
#3
|
elite*gold: 0
Join Date: Jun 2009
Posts: 203
Received Thanks: 511
|
It doesn't work xD
|
|
|
05/16/2010, 20:40
|
#4
|
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
|
What doesn't work?
The whole programm or just one function or several?
|
|
|
All times are GMT +1. The time now is 08:58.
|
|