The Windows notification area (usually the area where the QQ Software is minimized) cannot be recorded by qtp, but qtp is the wintoolbar that can recognize the objects in this area.
You can use the getitemscount method of wintoolbar to obtain the number of buttons displayed in the Windows notification area. You can use the getitem method to obtain the text of the buttons, so that you can compare them one by one, find the button to be clicked. Finally, press the button to perform the operation.
The following is an example of clicking the QQ icon in the Windows notification area:
Btncount = Window ("window"). wintoolbar ("notification area"). getitemscount
For I = 1 to btncount
Set BTN = Window ("window"). wintoolbar ("notification area ")
Btnname = BTN. getitem (I)
Print btnname
Ifbtnexist = instr (1, btnname, "QQ", 1)
If ifbtnexist> 0 then
BTN. Press BTN. getitem (I)
Exit
End if
Next