Pythonのお勉強 Part30
at TECH
791:デフォルトの名無しさん
08/12/26 15:09:33
URLリンク(www.python.jp)
from ctypes import *
from ctypes.wintypes import *
EnumWindows = windll.user32.EnumWindows
EnumWindows.argtypes = [c_void_p, c_int]
EnumWindows.restypes = c_int
EnumWindowsCallback = CFUNCTYPE(c_int, c_int, c_int)
GetWindowText = windll.user32.GetWindowTextA
GetWindowText.argtypes = [c_int, c_char_p, c_int]
GetWindowText.restypes = c_int
def pyEnumWindowsCallback(hwnd, lp):
buf = create_string_buffer('\000' * 1024)
GetWindowText(hwnd, buf, 1024)
if len(buf) > 0:
if buf.value != '':
print buf.value
return True
EnumWindows(EnumWindowsCallback(pyEnumWindowsCallback), 0)
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5206日前に更新/206 KB
担当:undef