I could use some help

06/22/2013 01:30 sander2828#1
i am working on pixel bot with autoit

is there way to make draggable area where bot starts looking for pixels and how?

i would like it to be like the one in this vid [Only registered and activated users can see links. Click Here To Register...]
06/22/2013 10:25 Croco™#2
As i have a good day here is the code for moving the rect.

You need a very small bg.gif ([Only registered and activated users can see links. Click Here To Register...])

And the code (I hate copy paste ;) ):

If you have any questions then ask !
06/22/2013 13:26 sander2828#3
what should this script do and can u check if my code has any mistakes because gui is not showing up.

Code:
#include <GDIPlus.au3>
#include <WinApi.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

HotKeySet( "{F10}","_Toggle")

$Size       = 300
$Color      = 0xFFFFAA00
$Thick      = 3
$Toggle     = False


Global $X=0,$Y=0

#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Aimbot", $Size, -1, -1, $WS_POPUP,Bitor($WS_EX_LAYERED,$WS_EX_TOPMOST))
$Pic1  = GUICtrlCreatePic("bg.gif", 0, 0, $Size, $Size)
_WinAPI_SetLayeredWindowAttributes($Form1, 0x00FF00)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###

_GDIPlus_Startup()
	$Handle = _GDIPlus_GraphicsCreateFromHWND($Form1)
	$Pencil =_GDIPlus_PenCreate($Color,$Thick)
			_GDIPlus_GraphicsDrawRect($Handle,5,5,$Size-10,$Size-10,$Pencil)


	While 1
		If $Toggle Then
			ToolTip("Mover your mouse (f10 to end)")
			$pos = MouseGetPos()
			WinMove("aimbot","",$Pos[0],$Pos[1])


			$X = $Pos[0]
			$Y = $Pos[1]
		Else
			ToolTip("")
			Sleep(200)
		EndIf
	WEnd
	_GDIPlus_Shutdown()

	Func _Toggle()
		$Toggle = Not $Toggle
	EndFunc
06/22/2013 13:52 Croco™#4
The script creats a hotkey (F10).
When you press this key the "edit mode" is enable and you can move the rect.
When you press F10 again the "edit mode" is disabled and the rect is on a fixed position.
In $x and $y are the new coordinations of the rect.
Now you can use PixelSearch with these variables to search for your pixel.
06/22/2013 13:56 sander2828#5
problem is that script starts working with no errors but rect is not showing up
06/22/2013 14:01 Croco™#6
Do you have the bg.gif at the same folder as the script ?
06/22/2013 14:03 sander2828#7
i sent u pm with skype
and yes the image was not in same folder lol
EDIT:after placing picture to same folder with .exe and .au3 still not showing
06/22/2013 14:39 omer36#8
GUICreate("Aimbot", $Size, $Size, -1, -1,


dennoch versteh ich den sinn hinter einer .gif nicht, und was dein hotkey bringen soll.
06/22/2013 14:43 Croco™#9
Gif, damit das Rechteck keinen Hintergrund hat und der HotKey um das Einbinden einer UDF zu vermeiden die das klicken der Maus erkennt.
06/22/2013 14:48 sander2828#10
ty omer box is showing and thanks to crocko for script.
but there is one more mistake somewhere box is not movable when pressing F10
it shows tool tip but nofthing hapens when moving mouse and when f10 gets pressed agen.

i speak english and estonian :)
06/22/2013 14:51 Croco™#11
You have to change the Title in WinMove from"aimbot" to "Aimbot".
Win move is case sensitive.
06/22/2013 15:36 sander2828#12
ty. but is there a way to make rect resizeable by pulling right bottom corner.
06/22/2013 15:41 Croco™#13
Yes and no. It is possible but not easy.
It would be easier if you use + and - for resize the rect. (_IsPressed)
06/22/2013 15:44 sander2828#14
because every user i may want to give this bot has different sized game window so it would be good that they can resize the rect to the size most fits to they-r window
06/22/2013 18:40 Croco™#15
But for that case you can use WinGetPos to get the windows size.