Need help with autoit bot !

07/27/2011 11:40 shad0wboss#1
I don't know but is english allowed here? lol anyways, i've been on an autoit script using theforsaken's tutorial but i'm stuck at a part, i want to add another place for spamming another key but here only one key is working...and also i can't figure out how to make the "stop" button work.

Quote:
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.0.0
Author: shad0wboss
#ce ----------------------------------------------------------------------------
#include <GUIConstantsEx.au3>

GUICreate("shad0wboss's Bot", 300, 150)

GUISetState(@SW_SHOW)

GUICtrlCreateLabel("AOE", 2, 10)
$key1 = GUICtrlCreateInput("", 65, 8, 120)

GUICtrlCreateLabel("PickUp", 2, 82)
$key2 = GUICtrlCreateInput("", 65, 40, 120)

GUICtrlCreateLabel("Spam times", 2, 44)
$time1 = GUICtrlCreateInput("", 65, 75, 120)

$startbutton = GUICtrlCreateButton("Start", 190, 8, 60)

$stopbutton = GUICtrlCreateButton("Stop", 190, 40, 60)

While 1
$msg = GUIGetMsg()

Select

Case $msg = $startbutton

$send1 = GUICtrlRead($key1)
$send2 = GUICtrlRead($key2)
$sleep1 = GUICtrlRead($time1)

While 1
Send($send1)
Send($send2)
Sleep($sleep1)
WEnd

Case $msg = $stopbutton
Exit



Case $msg = $GUI_EVENT_CLOSE
GUIDelete()
ExitLoop
EndSelect

WEnd
07/27/2011 15:44 bollen#2
You read the wrong input for your send and sleep.
and If you have started the script you can not Close them because you are in an loop.
Code:
While 1
Send($send1)
Send($send2)
Sleep($sleep1)
wend
if you Make it with AdlibRegister() you can Exit the script
07/27/2011 15:58 shad0wboss#3
ok one more thing, for the buff, how can i have a hotkey which is pressed after 60 seconds so that includes timer but i can't figure out how to call it.


Quote:
While 1
$msg = GUIGetMsg()

Select

Case $msg = $startbutton

$send1 = GUICtrlRead($key1)
$send2 = Guictrlread($key2)
$sleep1 = GUICtrlRead($time1)
AdlibRegister("_Send", $sleep1)

Case $msg = $stopbutton
Exit
Case $msg = $GUI_EVENT_CLOSE
GUIDelete()
ExitLoop


EndSelect
WEnd

Func _Send()
Send($send1)
Send($send2)
EndFunc ;==>_Send


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;,
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Bot is "Paused". Press Pause again to resume',0,0)
WEnd
ToolTip("")
EndFunc

Func Terminate()
Exit 0
EndFunc

Func ShowMessage()
MsgBox(4096,"","Bot is paused. Press Stop to exit")
EndFunc
also do you think this would work?

Quote:
While 1
$msg = GUIGetMsg()

Select

Case $msg = $startbutton

ControlSend("TwelveSky2", "", "", GUICtrlRead($key1))
ControlSend("TwelveSky2", "", "", GUICtrlRead($key2))


Case $msg = $stopbutton
Exit
Case $msg = $GUI_EVENT_CLOSE
GUIDelete()
ExitLoop


EndSelect
WEnd
07/27/2011 19:08 bollen#4
Quote:
also do you think this would work?
Yes i think so if you call it with the right values


Quote:
how can i have a hotkey which is pressed after 60 seconds so that includes timer but i can't figure out how to call it.
If you want to send this Key every 60 seconds then you can try it with
Code:
AdlibRegister("_Send2", 60000)
Func _Send2()
Send("What you want to send")
endfunc
For the pause function you can stop all functions
Code:
Global $pausebutton=0
.......
Case $pausebutton
if $pausestartet=1 then
$pausestartet=0
ToolTip("")
AdlibRegister("_Send1",$sleep1)
AdlibRegister("_Send2",60000)
else
$pausestartet=1 
ToolTip('Bot is "Paused". Press Pause again to resume',0,0)
AdlibUnRegister("_Send1")
AdlibUnRegister("_Send2")
endif
because this is an endless loop
Code:
While $Paused
sleep(100)
ToolTip('Bot is "Paused". Press Pause again to resume',0,0)
WEnd
07/27/2011 21:34 shad0wboss#5
controlsend function isn't working.
07/27/2011 21:52 bollen#6
then you call it with the wrong values
you can get the values from the AutoIt Window Info Tool

€: At some Games Control send doesn't work.
for which game is it?
07/28/2011 12:41 shad0wboss#7
game i'm trying to use controlsend is TwelveSky2

ok here's the whole script but i can't get the 60 seconds timer to work...please suggest me where i can have it and how can it work? Also if i input F2 key in the boxes, it doesn't work but if i put F and then 2 together, it just spams F key...

Quote:
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.0.0
Author: shad0wboss
#ce ----------------------------------------------------------------------------
#include <GUIConstantsEx.au3>

GUICreate("shad0wboss's Bot", 400, 150)

GUISetState(@SW_SHOW)

GUICtrlCreateLabel("AOE", 2, 10)
$key1 = GUICtrlCreateInput("", 65, 8, 120)

GUICtrlCreateLabel("PickUp", 2, 40)
$key2 = GUICtrlCreateInput("", 65, 40, 120)

$time1 = GUICtrlCreateInput("Happy botting :)", 65, 110, 190)

$startbutton = GUICtrlCreateButton("Start", 270, 8, 60)

$stopbutton = GUIctrlcreatebutton("Stop", 270, 40, 60)

GUICtrlcreatelabel("Buff", 2, 75)
$key3 = GUIctrlcreateinput("", 65, 75, 120)



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;



Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
While 1
$msg = GUIGetMsg()

Select

Case $msg = $startbutton


$send1 = GUICtrlRead($key1)
$send2 = Guictrlread($key2)
$sleep1 = GUICtrlRead($time1)
AdlibRegister("_Send", $sleep1)

AdlibRegister("_Send2", 60000)


Case $msg = $stopbutton
Exit
Case $msg = $GUI_EVENT_CLOSE
GUIDelete()
ExitLoop


EndSelect
WEnd

$timer = TimerInit()


Func _Send()
Send($send1)
Send($send2)
EndFunc ;==>_Send

AdlibRegister("_Send2", 60000)
Func _Send2()
Send(GUICtrlRead($key3))
endfunc

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;,
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Bot is "Paused". Press Pause again to resume',0,0)
WEnd
ToolTip("")
EndFunc

Func Terminate()
Exit 0
EndFunc

Func ShowMessage()
MsgBox(4096,"","Bot is paused. Press Stop to exit")
EndFunc