Jump to content

Recommended Posts

Posted

hey.

i have an application that i need to get a 1x1 pixel screenshot of at certain coordinates.

then i need to get the color of the screenshot(put it in a picturebox and use pixelgetcolor?)

i CAN'T use pixelgetcolor() directly on the form.

i tried:

#include <ScreenCapture.au3>
HotKeySet("{ESC}", "Terminate")
Opt("MouseCoordMode", 0)
WinActivate("Diablo II")
mousemove(1,1)
WinSetOnTop("Diablo II", "Diablo II", 1)
func terminate()
    exit 0
endfunc
_Main()

Func _Main()
    Local $hGUI
$winhandle = WinGetHandle("Diablo II")
$bmphandle = _ScreenCapture_CaptureWnd (-1, $winhandle)
msgbox(0, "blahh", $winhandle & " & " & $bmphandle)
    ; Create GUI
    $hGUI = GUICreate("Screen Capture", 400, 300)
    $pic = GUICtrlCreatePic($bmphandle, 0,0,100,100)
    GUISetState()
    
    ; Capture window
    

EndFunc   ;==>_Main
while 1
    
wend

but that didnt work.

any ideas?

Posted

So why can't you use PixelGetColor? Is it not returning anything?

when i use pixelgetcolor() it returns the wrong color.

when i hold the mouse over a big red blob it outputs green, if i move it a pixel it shows blue, back to the first pixel and it's black.

i think the game is using some kind of layers for drawing.

the game is Diablo II:Lord of destruction

i tried taking a screenshot and paste it in paint, then pixelgetcolor() returns the right color

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
×
×
  • Create New...