[Tutor] how do I use windows.h with python?
elis aeris
hunter92383 at gmail.com
Wed Apr 2 02:14:37 CEST 2008
this is a sample code that use window.h function i THINK.
where can I read up on windll ?
class RECT(Structure):
_fields_ = [
('left', c_ulong),
('top', c_ulong),
('right', c_ulong),
('bottom', c_ulong)
]
# time.sleep(2)
GetForegroundWindow = windll.user32.GetForegroundWindow
GetWindowRect = windll.user32.GetWindowRect
# Grab the foreground window's screen rectangle.
rect = RECT()
foreground_window = GetForegroundWindow()
GetWindowRect(foreground_window, byref(rect))
image = ImageGrab.grab((rect.left, rect.top, rect.right, rect.bottom))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080401/05e68048/attachment.htm
More information about the Tutor
mailing list