solidacid Posted July 25, 2008 Share Posted July 25, 2008 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? Link to comment Share on other sites More sharing options...
weaponx Posted July 25, 2008 Share Posted July 25, 2008 Ummm I hate to tell you but a 1x1 screenshot is the same thing as PixelGetcolor... Link to comment Share on other sites More sharing options...
James Posted July 25, 2008 Share Posted July 25, 2008 Ummm I hate to tell you but a 1x1 screenshot is the same thing as PixelGetcolor...And doing a screen capture would be slower! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
yyyy273 Posted July 25, 2008 Share Posted July 25, 2008 Take a look at ImageMagick if you have to use a 1x1 screenshotSpecifically, look up crop and histogram Link to comment Share on other sites More sharing options...
weaponx Posted July 25, 2008 Share Posted July 25, 2008 So why can't you use PixelGetColor? Is it not returning anything? Link to comment Share on other sites More sharing options...
solidacid Posted July 25, 2008 Author Share Posted July 25, 2008 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 destructioni tried taking a screenshot and paste it in paint, then pixelgetcolor() returns the right color Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now