Jump to content

PixelGetColor error with minimized window


Recommended Posts

Hello i have small problem with PixelGetColor in window minimized mode.

I have code:

Opt("PixelCoordMode", 2)
Run("D:\Program Files\Diablo II\Diablo II.exe -w -ns") ;run diablo 2 in window mode without sound
WinWait("Diablo II")
$hWnd = WinGetHandle("Diablo II")

Sleep(3000)
$var = PixelGetColor(10,100,$hWnd)
MsgBox(0,"",Hex($var, 6))

When I run the program and the game is in the window displays to me the color of the game, but when the game is minimized takes me to the color pixel from your desktop, and not from the minimized game window. What have I done wrong?

I have the exact same problem with the function PixelChecksum o_O

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...