关于函数_Lib_PopupGetHwnd
在3.2.8里有这个函数_Lib_PopupGetHwnd([$iIndex]) ,在新版3.2.13里用不了。有谁知道用那个能代替这个,请告知一下。非常感谢!!! 我也想知道,那位做一个呢 不知道!:face (14): #include-once#include <GuiMenu.au3>
;#include <GuiToolbar.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
Opt("MustDeclareVars", 1)
Global $gaPopups = []
Func _Lib_PopupGetHwnd($iIndex = 1)
_Lib_PopupWait()
Return $gaPopups[$iIndex]
EndFunc ;==>_Lib_PopupGetHwnd
Func _Lib_PopupScan()
Local $iI, $sClass, $hWnd, $hMenu
ReDim $gaPopups
$gaPopups = 0
ReDim $winapi_gaWinList
$winapi_gaWinList = 0
$winapi_gaWinList = 64
_WinAPI_EnumWindowsPopup()
For $iI = 1 To $winapi_gaWinList
$hWnd = $winapi_gaWinList[$iI]
$sClass = $winapi_gaWinList[$iI]
Select
Case $sClass = "#32768"
$hMenu = _SendMessage($hWnd, $MN_GETHMENU, 0, 0)
_Lib_PopupAdd($hMenu, 1, $hWnd)
Case $sClass = "ToolbarWindow32"
_Lib_PopupAdd($hWnd, 2, _WinAPI_GetParent($hWnd))
Case $sClass = "ToolTips_Class32"
_Lib_PopupAdd($hWnd, 3, _WinAPI_GetParent($hWnd))
EndSelect
Next
EndFunc ;==>_Lib_PopupScan
Func _Lib_PopupWait()
Local $iLoop = 0
While $iLoop < 50
If $gaPopups > 0 Then Return
Sleep(100)
_Lib_PopupScan()
$iLoop += 1
WEnd
ConsoleWrite("Timeout waiting for popup window to appear" & @CRLF)
EndFunc ;==>_Lib_PopupWait
Func _Lib_PopupAdd($hWnd, $iType, $hParent)
Local $iCount
$gaPopups += 1
$iCount = $gaPopups
ReDim $gaPopups[$iCount + 1]
$gaPopups[$iCount] = $hWnd
$gaPopups[$iCount] = $iType
$gaPopups[$iCount] = $hParent
EndFunc ;==>_Lib_PopupAdd 是这个吗?官方说,新版已经不支持此函数了,这个是折衷办法 我也想知道,那位做一个呢
页:
[1]