Ok so i made my code and it kinda works :/
it works every where but the program i want it to run in which is a game client
any ideas
HotKeySet("{F9}","FightOnOff")
HotKeySet("{F10}","ExitApp")
Tooltip("F9 = Fight, F10 = Exit bot", 0, 0)
Dim $fight = False
Func FightOnOff()
If $fight = False Then
$fight = True
ToolTip("Fighting",0,0)
Else
$fight = False
Tooltip("F9 = Fight, F10 = Exit bot", 0, 0)
EndIf
EndFunc
Func ExitApp()
Exit
EndFunc
While True
If $fight = True Then
Dim $cordinates = PixelSearch( 0, 0, @DesktopWidth, @DesktopHeight, 0x030200)
If Not @error Then
MouseClick( "left", $cordinates[0], $cordinates[1], 1, 0)
EndIf
EndIf
Sleep(500)
WEnd