#include <ScreenCapture.au3>
$hWnd = WinGetHandle("[CLASS:Diablo II]")
If $hWnd <> 0 Then
_ScreenCapture_CaptureWnd("screenshot.png", $hWnd)
Else
MsgBox(0, "Error", "I cant find the diablo 2 window ah i need to go outside, or not...")
EndIf
import pygetwindow as gw
from PIL import ImageGrab
window = gw.getWindowsWithTitle("Diablo II")
if window:
left, top, right, bottom = window[0].left, window[0].top, window[0].right, window[0].bottom
ImageGrab.grab(bbox=(left, top, right, bottom)).save("screenshot.png")
else:
print("Window not found.")
diablo 2 configure controls -> screenshot -> set keybind "print screen"
0/10