Sign in to follow this  
Followers 0
Zohar

[Closed] Getting a Handle for a ContextMenu of Some Application

1 post in this topic

#1 ·  Posted (edited)

Hello

Let's say you open Windows Messenger,

Goto Menu: Tools\Options

and then goto the Privacy tab.

On the Right we have the "Blocked List".

If I RightClick this ListBox, I get a small ContextMenu.

How can I get a Handle for that ContextMenu?

I tried running this code, when the Messenger's Options window is open, and the Privacy Tab is selected:

<div class='codetop'>CODE</div><div class='codemain' style='height:200px;overflow:auto'>

#Include <GuiMenu.au3>

WinActivate ("Options")

WinWaitActive("Options")

Local $hListBox_Blocked=ControlGetHandle("Options","","[CLASSNN:SysListView322]")

Local $hMenu = _GUICtrlMenu_GetMenu($hCon)

Local $iMenuItems = _GUICtrlMenu_GetItemCount($hMenu)

ConsoleWrite($iMenuItems & @CRLF)

</div>

and nfortunately, the result I get for $iMenuItems, is -1 :)

What am I missing?

Edited by Zohar

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0