can someone please look why hotkey is not working.

06/25/2013 01:20 sander2828#1
here is the script autoit debugger does not show that func _lookpix() works.
and when testing it does not look for pixel ....


Code:
#include <GDIPlus.au3>
#include <WinApi.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
HotKeySet("{F10}", "_Toggle")
HotKeySet("{q}", "_lookpix")
$Size1 = 760
$Size2 = 530
$Color = 0xFFFFAA00
$Thick = 3
$Toggle = False



#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Aimbot", $Size1, $Size2, -1, -1, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST))
$Pic1 = GUICtrlCreatePic("bg.gif", 0, 0, $Size1, $Size2)
_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, $Size1 - 10, $Size2 - 10, $Pencil)


While 1
	If $Toggle Then
		ToolTip("Move your mouse (f10 to end)")
		$pos = MouseGetPos()
		WinMove("Aimbot", "", $pos[0], $pos[1])
	Else
		ToolTip("")
		Sleep(200)
	EndIf
WEnd


_GDIPlus_Shutdown()



Func _Toggle()
	$Toggle = Not $Toggle
EndFunc   ;==>_Toggle

HotKeySet("{ESC}", "_Exit")

Func _Exit()
	Exit
EndFunc   ;==>_Exit


Func _lookpix()
	$Bpos = WinGetPos("Aimbot")
	$Variable = PixelSearch($Bpos[0], $Bpos[1], $Bpos[2], $Bpos[3], 0x3B0B06)
	If IsArray($Variable) = True Then
		MouseClick("primary", $Variable[0], $Variable[1], 2, 1)
		Sleep(80)
		Send("{LCTRL}")
	EndIf
	Return
	If IsArray($Variable) = False Then
		$Variable2 = PixelSearch($Bpos[0], $Bpos[1], $Bpos[2], $Bpos[3], 0xE79186)
	EndIf
	If IsArray($Variable2) = True Then
		MouseClick("primary", $Variable2[0], $Variable2[1], 2, 1)
		Sleep(80)
		Send("{LCTRL}")
	EndIf
	Return
EndFunc
#SOLVED
06/25/2013 12:38 omer36#2
-PixelSearch($Bpos[0], $Bpos[1], $Bpos[0]+$Bpos[2], $Bpos[1]+$Bpos[3])
-delete "Return"
-not sure if MouseClick("primary") works... ( use "left" if not)

€and maby
HotKeySet("{q}" -> HotKeySet("q"
06/25/2013 16:12 sander2828#3
ty for the answer it is totaly right and mouse primary is working. if i use left ppl with reverted mouse can't use it :)
06/28/2013 14:34 Lawliet#4
#closed