Trouble accessing Windows notification tray area.
Posted: Mon Dec 18, 2006 6:13 am
Hi,
I'm trying to write a test to right-click on an icon in the Windows notification tray and then identify a context menu item by text and left-click on that.
What I have so far looks something like:
I suspect I'm not using ToolStripSelectPosition() correctly as there is no possibility of specifying right-clicking on the icon. Unfortunately I'm not familiar with .Net so a lot of the terminology itself is new to me (things like forms, controls, elements, etc...).
Cheers.
I'm trying to write a test to right-click on an icon in the Windows notification tray and then identify a context menu item by text and left-click on that.
What I have so far looks something like:
Code: Select all
hTaskTray = r.FormFindClassName("Shell_TrayWnd", 1, TRUE, TIMEOUT)
hNotifyTray = r.FormFindChildClassName(hTaskTray, "TrayNotifyWnd", 1)
hNotifyArea = r.FormFindChildClassName(hNotifyTray, "ToolbarWindow32", 1)
# Print the number of notification area icons
print r.ToolStripGetItemCount(hNotifyArea)
# Select Windows volume control icon and select the second item on
# its menu
print r.ToolStripSelectPosition(hNotifyArea, 1, 2) # CRASHES PythonWin
Cheers.