Pythonのお勉強 Part30 at TECH
[2ch|▼Menu]
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