Sign in to follow this  
Followers 0
ViperMan

Problems with PixelGetColor

5 posts in this topic

I made me a bot to grab and gather Dec. and Hexs of colors for a future bot i will be making...

I get it to work its just it does want to grab colors from in game window I keep getting Decimal 0 Hex 000000 idk what to do lol

Plz help >_<

#include <GUIConstantsEx.au3>

#include <EditConstants.au3>

#include <WindowsConstants.au3>

;Opt("ColorMode", 3)

Opt("PixelCoordMode", 2)

;Opt("WinTitleMatchMode", 0)

HotKeySet("{NUMPADADD}", "Start")

HotKeySet("{NUMPADSUB}", "Stop")

GUICreate("Pixel Getter", 200, 100)

$Name = GUICtrlCreateInput("", 10, 40, 180, 20)

GuiCtrlCreateLabel("Number Pad +", 10, 0)

GuiCtrlCreateLabel("To Get Pixels", 10, 17)

GuiCtrlCreateLabel("Number Pad -", 10, 60)

GuiCtrlCreateLabel("To Easy Exit", 10, 77)

WinSetOnTop("Pixel Getter", "", 1)

GuiSetBkColor(11103312)

GUISetState(@SW_SHOW)

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

WEnd

GUIDelete()

Func Start()

Opt("PixelCoordMode", 2)

;WinActivate("FiestaOnline")

;WinWaitActive("FiestaOnline")

$Mouse = MouseGetPos()

$var = PixelGetColor( $Mouse[0] , $Mouse[1], "FiestaOnline")

iniwrite("Pixels.ini", "Decimal", GUICtrlRead($Name), $var)

iniwrite("Pixels.ini", "Hex", GUICtrlRead($Name), Hex($var, 6))

MsgBox(4096, $Mouse[0], GUICtrlRead($Name))

EndFunc

Func Stop()

Exit

EndFunc

I been playing with this for a while lol

Share this post


Link to post
Share on other sites



The problem is that AutoIt is unable to read pixels from the Sierra Online window.

I found a working bot for Sierra Online that reads pixels too here: http://www.mpcforum.com/showthread.php?t=211100

It's in C++. Good luck!

Share this post


Link to post
Share on other sites

I think you're having the actual problem when using a Window Title when you are needing the Window Handle in PixelGetColor.

Try

$h_FiestaWindow = WinGetHandle("FiestaOnline")
$var = PixelGetColor( $Mouse[0] , $Mouse[1], $h_FiestaWindow)

If that doesn't work you can always just nix using the window handle. Unless you're trying to use the pixel

Saw Manadar posted...this is his area of expertise.

Jarvis


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

I tryed downloading that earlyer b4 posting to see if i could go through and find out what i was doing wrong but i try to download it and I get...

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?

If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

And this isn't neccisaly the game I was going for but just using for a test as The other game is in maintance atm

TY for Reply >_<

Share this post


Link to post
Share on other sites

I tryed downloading that earlyer b4 posting to see if i could go through and find out what i was doing wrong but i try to download it and I get...

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?

If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

And this isn't neccisaly the game I was going for but just using for a test as The other game is in maintance atm

TY for Reply >_<

You probably need to register for an account there before you can download the file.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0