Jump to content


taking grabs of the screen from OpenGL and DirectX apps


  • Please log in to reply
3 replies to this topic

#1 goblin

goblin
  • Guests

Posted 27 April 2012 - 04:04 PM

None of the 3 modes (Alt, Slow, normal) of PixelGetColor work with full-screen DirectX applications (such as games). Would be cool to have a way to examine the contents of the screen for such applications too. An open-source application called Taksi is capable of doing that, so the code could be borrowed from it - I believe it works by hacking into the SwapBuffers calls or something to that effect.

For now the one game I need it for (Diablo 3 (beta)) seems to work fine in windowed mode, and in windowed mode Autohotkey seems to be able to detect pixels on the screen correctly. (When in fullscreen, I was getting grabs of the underlying desktop.)

#2 goblin

goblin
  • Guests

Posted 17 May 2012 - 11:15 AM

Meh, actually, diablo 3 doesn't work. ImageSearch works when I work with screenshots displayed in GIMP, however it always returns "1" (not found) when Diablo 3 is active (even in fullscreen windowed mode). Screenshots go to clipboard fine, but Autohotkey doesn't seem to find any images.

Also, a bit unrelated - is there a way to save a region of the active window to a file? It'd definitely help with debugging this, but I also have other uses.

#3 goblin

goblin
  • Guests

Posted 17 May 2012 - 11:20 AM

What's weird, is I can successfully get the correct pixel color of the pixel under mouse with PixelGetColor (in Diablo 3)

#4 Scratch

Scratch
  • Members
  • 100 posts

Posted 30 May 2012 - 03:49 PM

i use nircmd for (partial)screengrabs that you can run from ahk e.g.:
run nrcmd savescreenshotwin *clipboard* 150 150 400 400
I usually proceed have the program paste clip in picpick editor (as it has the nice measurement rulers) and have it to the
pixelsearches there, but,

it would be so nice if ahk got its own screencapture command... ehr i mean Window.activewindow.region.capture(x1,y1,x2,y2) object.

i know Sean wrote a great capture function some time ago but it doesn't want to run on my ahk_l win7 64 setup and many scripts
relying on Tariq Porters superb gdi lib won't run anymore, it seems ahk is experiencing its own version of dll hell as it moves forward,
forking in different directions.

Ahk buildin screengrab functionality (including directx) would be great, as also would be to do pixel/imagesearches mot
only on the screen, but in the clipboard or in clipfiles saved on disk, bump