Originally Posted by
MlokCZ
I am using gdip_all.ahk. Problem still the same, 64 bit D3 don't return correctly gameBitmap := Gdip_BitmapFromHWND(hwnd). When I switch to 32 bit D3, than it works.
Which Win version do you use?
win10 x64 ver 1903 build 18362.356
you may not try make full working scriptto interactive with the game screen. Just to test out the gdip
Here is a ahk using gdip for screen capture and save as .png file
It should work with or without turbohud is running
Code:
SetWorkingDir %A_ScriptDir%
#Include GDIP_All.ahk
Screenshot(outfile, screen)
{
pToken := Gdip_Startup()
hwnd := WinExist("ahk_exe Diablo III64.exe") ;;; D3 64 bit client
pBitmap := Gdip_BitmapFromHWND(hwnd)
Gdip_SaveBitmapToFile(pBitmap, outfile, 100)
Gdip_DisposeImage(pBitmap)
Gdip_Shutdown(pToken)
}
!F5:: ;;ALT-F5
Screenshot(A_ScriptDir "\Screenshot_" A_Now ".png", "300|200|300|200")
; screen: X|Y|W|H
Return