Login Register






PixelGetColor() Help! filter_list
Author
Message
PixelGetColor() Help! #1
I'm to make a bot for Extaliams (Maplestory Private Server) I'm trying to use PixelGetColor to get the color and coordinate of a pixel using this program i wrote

Code:
MsgBox(0, "Pixel Search", "F1 Pixel Read; F2 Exit", 1) HotKeySet("{F1}", "PIXELREAD") HotKeySet("{F2}", "QUIT") WinActivate("ExtaliaMS") WinWaitActive("ExtaliaMS") Opt("WinWaitDelay",100) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",2) WinMove("ExtaliaMS", "", 0, 0) Opt("PixelCoordMode",2) dim $pos[2] dim $color Global $searchfor While 1 Sleep(100) WEnd Func PIXELREAD() $pos = MouseGetPos() $color = PixelGetColor($pos[0], $pos[1]) ToolTip("Color: "&$color& " X: "&$pos[0]&" Y: "&$pos[1], 1740, 0) EndFunc Func QUIT() Exit 0 EndFunc

It work on every other window except for the game window. I'm wondering if the game has some kind of defense against getting pixel colors. The results i get are what is BEHIND the game window such as my background color. Anyone can help me get around this problem

Reply

RE: PixelGetColor() Help! #2
I'm not entirely sure but if Maple Story is an in-browser client, it should work fine. If it's a desktop client, IDFK. Have you tried using a 'MouseClicked' type variable (I'm pretty rusty with Auto) or would that just defeat the purpose?
It's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.

Reply

RE: PixelGetColor() Help! #3
(06-07-2014, 03:37 PM)Jinxed Wrote: I'm not entirely sure but if Maple Story is an in-browser client, it should work fine. If it's a desktop client, IDFK. Have you tried using a 'MouseClicked' type variable (I'm pretty rusty with Auto) or would that just defeat the purpose?

Maplestory is a desktop client, often played in full screen, but i like to play it windowed. I'm not too sure of what you mean by 'MouseClicked' variable? Sorry I'm new to Autoit please excuse my ignorence

Reply

RE: PixelGetColor() Help! #4
(06-07-2014, 06:34 PM)Hakum Wrote:
(06-07-2014, 03:37 PM)Jinxed Wrote: I'm not entirely sure but if Maple Story is an in-browser client, it should work fine. If it's a desktop client, IDFK. Have you tried using a 'MouseClicked' type variable (I'm pretty rusty with Auto) or would that just defeat the purpose?

Maplestory is a desktop client, often played in full screen, but i like to play it windowed. I'm not too sure of what you mean by 'MouseClicked' variable? Sorry I'm new to Autoit please excuse my ignorence

I coded JS for a bit so I only kind of understand the code.
I was thinking instead of
Code:
Func PIXELREAD() $pos = MouseGetPos() $color = PixelGetColor($pos[0], $pos[1]) ToolTip("Color: "&$color& " X: "&$pos[0]&" Y: "&$pos[1], 1740, 0) EndFunc
you could do something like
Code:
Func PIXELREAD() if MouseIsPressed() $pos = MouseGetPos() $color = PixelGetColor($pos[0], $pos[1]) ToolTip("Color: "&$color& " X: "&$pos[0]&" Y: "&$pos[1], 1740, 0) EndFunc
or
Code:
Func PIXELREAD() $pos = MouseGetPos() $color = PixelGetColor($pos[0], $pos[1]) ToolTip("Color: "&$color& " X: "&$pos[0]&" Y: "&$pos[1], 1740, 0) "PIXELREAD" EndFunc
Note: Not sure this one would work. The last line would (I guess) go back to the function.
It's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.

Reply

RE: PixelGetColor() Help! #5
(06-07-2014, 09:08 PM)Jinxed Wrote:
(06-07-2014, 06:34 PM)Hakum Wrote:
(06-07-2014, 03:37 PM)Jinxed Wrote: I'm not entirely sure but if Maple Story is an in-browser client, it should work fine. If it's a desktop client, IDFK. Have you tried using a 'MouseClicked' type variable (I'm pretty rusty with Auto) or would that just defeat the purpose?

Maplestory is a desktop client, often played in full screen, but i like to play it windowed. I'm not too sure of what you mean by 'MouseClicked' variable? Sorry I'm new to Autoit please excuse my ignorence

I coded JS for a bit so I only kind of understand the code.
I was thinking instead of
Code:
Func PIXELREAD() $pos = MouseGetPos() $color = PixelGetColor($pos[0], $pos[1]) ToolTip("Color: "&$color& " X: "&$pos[0]&" Y: "&$pos[1], 1740, 0) EndFunc
you could do something like
Code:
Func PIXELREAD() if MouseIsPressed() $pos = MouseGetPos() $color = PixelGetColor($pos[0], $pos[1]) ToolTip("Color: "&$color& " X: "&$pos[0]&" Y: "&$pos[1], 1740, 0) EndFunc
or
Code:
Func PIXELREAD() $pos = MouseGetPos() $color = PixelGetColor($pos[0], $pos[1]) ToolTip("Color: "&$color& " X: "&$pos[0]&" Y: "&$pos[1], 1740, 0) "PIXELREAD" EndFunc
Note: Not sure this one would work. The last line would (I guess) go back to the function.

That wouldn't change anything other than changing the hotkey to a click than pressing F1...

Reply