[TUTORIAL] How to make a BOT

07/23/2011 14:42 xEr0r#91
can someone pls translate it into german
09/24/2011 17:42 micron#92
im hardly can't understand much better in chapter 4. need more images and informations. but all in all i like ur thread. :D
09/27/2011 03:31 insteadof#93
Code:
#cs ----------------------------------------------------------------------------
	AutoIt Version: 3.3.0.0
	Author: Forsaken 
#ce ----------------------------------------------------------------------------
#include <GUIConstantsEx.au3>

GUICreate("Forsaken's Bot", 335, 100)

GUISetState(@SW_SHOW)

GUICtrlCreateLabel("Key", 8, 10)
$key1 = GUICtrlCreateInput("", 35, 8, 120)
GUICtrlCreateLabel("Time", 8, 44)
$time1 = GUICtrlCreateInput("", 35, 40, 120)

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

While 1
	$msg = GUIGetMsg()
	
	Select
		
		Case $msg = $startbutton
				
				$send1 = GUICtrlRead($key1)
				$sleep1 = GUICtrlRead($time1)
				
			While 1	
				Send($send1)
				Sleep($sleep1)
			WEnd
			
		Case $msg = $GUI_EVENT_CLOSE
			GUIDelete()
			ExitLoop
			
	EndSelect
		
WEnd
how to make pause button and exit button ?
help :confused:
10/25/2011 22:32 auto13#94
I am having trouble with GUI appearing after some function is run. I have the following code

$Button1 = GUICtrlCreateButton("Open...", 48, 48, 187, 25)
GUICtrlSetOnEvent(-1, 'new') ; Runs website() when pressed

Func new()
; Hides the GUI while the function is running
GUISetState(@SW_HIDE)
Run(".....")
Exit
EndFunc
;show GUI again after the function has finished running
GUISetState(@SW_SHOW)

After I click this button and run the function, the gui hides but it does not appear again even though I have @SW_SHOW.
Can someone help me with this please. Thanks.
11/01/2011 14:51 lolkop#95
Quote:
Originally Posted by insteadof View Post
Code:
#cs ----------------------------------------------------------------------------
	AutoIt Version: 3.3.0.0
	Author: Forsaken 
#ce ----------------------------------------------------------------------------
#include <GUIConstantsEx.au3>

GUICreate("Forsaken's Bot", 335, 100)

GUISetState(@SW_SHOW)

GUICtrlCreateLabel("Key", 8, 10)
$key1 = GUICtrlCreateInput("", 35, 8, 120)
GUICtrlCreateLabel("Time", 8, 44)
$time1 = GUICtrlCreateInput("", 35, 40, 120)

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

While 1
	$msg = GUIGetMsg()
	
	Select
		
		Case $msg = $startbutton
				
				$send1 = GUICtrlRead($key1)
				$sleep1 = GUICtrlRead($time1)
				
			While 1	
				Send($send1)
				Sleep($sleep1)
			WEnd
			
		Case $msg = $GUI_EVENT_CLOSE
			GUIDelete()
			ExitLoop
			
	EndSelect
		
WEnd
how to make pause button and exit button ?
help :confused:
your script stucks in the 2nd while loop. to prevent such things, you should learn to use states.

you could simply set a variable which holds a "run" state. if run is true, the script will do some stuff. since you're allready in an endless loop, for scanning the gui events, you can put a simple if query.

if $run is true, then do your actions.

this will enable you to only set the $run variable, once the startbutton is called.

now that we've got a variable which is true or false, depending on the state the script is in currently, we can even modify the button to show us 'Start' or 'Stop', depending on the state.

if the actions are currently running, we wanna set the button label to Stop. if the script is not running ($run = False ( = 0 )), we set the button label to Start.

beside that, you should never use the sleep command in your script. it's way better to use timer functions, since sleep blocks your script.

once the script gets into sleep mode, no other commands will be applied. that means, that the gui won't get checked for events. (if you use a button the script won't get to know about it).

a reworked script could look like this:
Code:
Dim $timer, $run = False, $label[2]=['Start','Stop']

$gui = GUICreate("Forsaken's Bot", 335, 100)
GUISetState()
GUICtrlCreateLabel("Key", 8, 10)
$key1 = GUICtrlCreateInput("", 35, 8, 120)
GUICtrlCreateLabel("Time", 8, 44)
$time1 = GUICtrlCreateInput("", 35, 40, 120)

$button = GUICtrlCreateButton($label[$run], 190, 8, 60)

While 1
	Switch GUIGetMsg()
		Case -3
			ExitLoop
		Case $button
			$run = Not $run
			GUICtrlSetData($button, $label[$run])
			$timer = 0
		Case Else
				If $run Then
					If TimerDiff($timer) > GUICtrlRead($time1) And Not WinActive($gui) Then
						Send(GUICtrlRead($key1))
						$timer = TimerInit()
					EndIf
				EndIf
	EndSwitch
WEnd
02/04/2012 02:27 TheDamneder#96
Thx but if u can make TheCrims bot
for go to nightclub comand and healing power comand
and Click mouse and write any thing i says by click start on bot i make?
02/19/2012 00:26 sasukegamer#97
Can someone tell me how to search memory address for monster in the game?

And i want to search memory address for level in the game?

Could someone tell me the way to solve my problems please!!!!!!!!!!!!!!

:handsdown: :confused:
:handsdown: :confused:
:handsdown: :confused:
:handsdown: :confused:
04/07/2012 14:09 ks661354#98
in chapter 2

why the program can't exit after I pressed the start .

it still in loop .

Quote:
Originally Posted by ks661354 View Post
in chapter 2

why the program can't exit after I pressed the start .

it still in loop .

ok I understand . thanks
08/06/2012 08:50 dreamerdd#99
How would i go about making autoit to be active with my game window in windowed mode

i have tried winactive and tried pixelsearch none worked

if there some other way to hook auto-it to a program window?
09/15/2012 09:37 NoobiPoopi#100
This is a really good tutorial. Thanks!
11/15/2012 23:39 ExerlosMyst#101
How do i use a low level key hook in this programm?
I am a totall noob i have searched everywhere.

I need another Command for send because send is blocked by the Game I want to use.

Could you help me please?
11/16/2012 14:19 Achat#102
Quote:
Originally Posted by ExerlosMyst View Post
I need another Command for send because send is blocked by the Game I want to use.
Code:
#RequireAdmin
may help you ;)

rgds
11/24/2012 03:21 naruto3967#103
hi guys can i request this ^^
need a script that makes you press "Y" every5 seconds and at the same time it presses "1" every 0.5 second
11/24/2012 19:31 Achat#104
Quote:
Originally Posted by naruto3967 View Post
hi guys can i request this ^^
need a script that makes you press "Y" every5 seconds and at the same time it presses "1" every 0.5 second
Request here: [Only registered and activated users can see links. Click Here To Register...]

Code:
AdlibRegister('_1', 5000)
AdlibRegister('_2', 500)

While 1
	Sleep(1)
WEnd

Func _1()
	Send('{Y}')
EndFunc   ;==>_1

Func _2()
	Send('{1}')
EndFunc   ;==>_2
Have fun.

rgds
11/30/2012 18:17 dvdljns#105
The bot will not do anything. It is good for writing text to note pad and that is all. You need to explain that all this tutorial is good for is to learn how to build a simple GUI. It will not work as a bot for a game. Calling it a bot tuterial is miss leading.