Hello. I'm new here and I have got a question. I think its very easy for YOU, but i dont know the right script commands.
The following script presses the left mouse button when the pixel right under the mouse pointer changes its colour. The whole thing only starts scanning the pixel when it was activated before with the hotkey "e".
HotKeySet("{e}", "AwpSchuss")
$GegnerErkannt = 0
while 1
WEnd
func AwpSchuss()
$GegnerErkannt = 0
$MousePos = MouseGetPos()
$MouseColor1 = PixelGetColor($MousePos[0],$MousePos[1])
While $GegnerErkannt = 0
Sleep(10)
$MouseColor2 = PixelGetColor($MousePos[0],$MousePos[1])
if $MouseColor2 <> $MouseColor1 Then
Sleep(10)
MouseClick("left")
$GegnerErkannt = 1
EndIf
WEnd
EndFunc
Now i won't scan only the pixel under my mousepointer. I want to scan three pixel strings around my pointer (altogether 9 pixels, the middle is the one under the mouspointer and the 8 pixels around.)
When this is NOT possible or when this option is too hard to script then i wish that i can move the scanned area 3 pixels to the right and down from the mouse point. I think about something like this:
$MousePos = MouseGetPos(3,-3) ;The 3 and -3 stands for the displacement of the scanned pixel by 3 pixel right and down. The starting point ist the cursor.
;THIS IS ONLY an example of what i am actually meaning, its wrong (otherwise i wouldn't ask for the right script command).
I want to specify a tolerance before the script says "there is a new pixel-colour in the scanned area" and acts.Hello. I'm new here and I have got a question. I think its very easy for YOU, but i dont know the right script commands. (I cannot open a new topic so I ask here, I hope its okay.)
The following script presses the left mouse button when the pixel right under the mouse pointer changes its colour. The whole thing only starts scanning the pixel when it was activated before with the hotkey "e".
HotKeySet("{e}", "AwpSchuss")
$GegnerErkannt = 0
while 1
WEnd
func AwpSchuss()
$GegnerErkannt = 0
$MousePos = MouseGetPos()
$MouseColor1 = PixelGetColor($MousePos[0],$MousePos[1])
While $GegnerErkannt = 0
Sleep(10)
$MouseColor2 = PixelGetColor($MousePos[0],$MousePos[1])
if $MouseColor2 <> $MouseColor1 Then
Sleep(10)
MouseClick("left")
$GegnerErkannt = 1
EndIf
WEnd
EndFunc
Part 1:
Now I won't scan only the pixel under my mousepointer. I want to scan three pixel-strings around my pointer (altogether 9 pixels, the middle one is the one under the mouspointer and the 8 pixels around are the other eight ones .)
When this is NOT possible or when this option is too hard to script then i wish that i can move the scanned area 3 pixels to the right and down from the mouse point. I think about something like this:
$MousePos = MouseGetPos(3,-3) ;The 3 and -3 stands for the displacement of the scanned pixel by 3 pixel right and down. The starting point ist the cursor.
;THIS IS ONLY an example of what i am actually meaning, its wrong (otherwise i wouldn't ask for the right script command).
Part 2:
Also I want to specify a tolerance value before the script says "there is a new pixel-colour in the scanned area" and acts. Is that possible?