04-01-2010, 04:52 PM
Here is the code which is capable of doing double click
Code:
'Desc- Window Tray
Set oWindow = Description.Create
oWindow("regexpwndclass").value = "Shell_TrayWnd"
'Desc - WinToolBar: Notification Area
Set oSysTray= Description.Create
oSysTray("nativeclass").value = "ToolbarWindow32"
oSysTray("text").value = "Notification Area"
'Get Number of items in Notification area
nItems = Window(oWindow).WinToolbar(oSysTray).GetItemsCount
msgbox nItems
For nItem = 1 To nItems
'Get Name
sItemName = Window(oWindow).WinToolbar(oSysTray).GetItem(nItem)
If sItemName ="Skype" Then ' if the name is your required Application
x = Window(oWindow).WinToolbar(oSysTray).GetROProperty("abs_x")
y = Window(oWindow).WinToolbar(oSysTray).GetROProperty("abs_y")
objWidth = Window(oWindow).WinToolbar(oSysTray).GetROProperty("width")
ApproxIconWidth = objWidth / nItems '' ApproxIconWidth = TotalWidth / Total items count
objX =(ApproxIconWidth * nItem - 1) ''Formula used - ApproxIconWidth * ItemNumber - Gutter (i.e. space between two icons - Let gutter = 1)
Window(oWindow).WinToolbar(oSysTray).DblClick objX,2,micLeftBtn
End If
Next