- 97 名前:名無しさん@お腹いっぱい。 mailto:sage [2009/12/30(水) 11:57:01 ID:3SgEgPry0]
- // サブメニューのIDを取得する。
// TLimit=-1 : 永久待ち // TLimit=0 : 1回のみ // 戻り値 0 : 該当なし -1:ダイアログ表示 その他:サブメニューのID Function WaitSubMenuPopup( ID, TLimit = -1 ) def_dll GetWindow(hWnd,long):long:user32.dll Public GW_ENABLEDPOPUP = 6 // ポップアップウィンドウ result = 0 H = IDToHnd(ID) Repeat sleep(0.01) if 0 < TLimit then TLimit = TLimit - 0.01 retH = GetWindow( H, GW_ENABLEDPOPUP ) if ! retH then continue retID = HndToID(retH) Select Status(retID, ST_CLASS) case "#32768" // メニュー result = retID exit case "#32770" // ダイアログが表示されたらエラー中断 result = -1 exit Selend Until ! TLimit Fend
|

|