Why u search all the window?, if it is a 3d game a lot of pixels will be the same, try to limit your search to a small region, where is most likely to find your enemy or whatever.
Also auto shoot is not so good at all it will lock for a target for ever.
Try:
Code:
#include <Misc.au3>
HotKeySet("{F6}","_Exit")
While 1
$Variable = PixelSearch(0, 0, 1920, 1080/2, 0x00000);Try with half screen height
If IsArray($Variable) and _IsPressed("01") Then ;Left mouse button
MouseMove($Variable [0], $Variable [1],1)
;MouseClick("left") don't need
EndIf
WEnd
Func _Exit()
EndFunc