hi I am trying to get PID from the foreground window, but this doesn't work because I am passing the wrong kind of handle to the function. This is under python.
How do I fix this?
thx!
import ctypes
import time
time.sleep(2)
handle = ctypes.windll.user32.GetForegroundWindow()
print(handle)...