Ok, last question:
Why do i need the ConsoleWrite and...
#include <Misc.au3> #include <MsgBoxConstants.au3> Local $hDLL = DllOpen("user32.dll") While 1
If _IsPressed("10", $hDLL) Then
ConsoleWrite("_IsPressed - Shift Key was pressed." & @CRLF)
$Specnaz = PixelSearch(1561, 181,1747, 280,0xC9B880,10)
If IsArray($Specnaz) = True Then
MouseClick("Left",0,0,1,10)
EndIf
; Wait until key is released.
am I need this part, or can i delete it ?:
While _IsPressed("10", $hDLL)
Sleep(250)
WEnd
ConsoleWrite("_IsPressed - Shift Key was released." & @CRLF)
ElseIf _IsPressed("1B", $hDLL) Then
MsgBox($MB_SYSTEMMODAL, "_IsPressed", "The Esc Key was pressed, therefore we will close the application.")
ExitLoop
EndIf
Sleep(250) WEnd DllClose($hDLL)