What do you want to do with the application? Launch it? The following sample right-clicks the icon in the system tray based on the app name:
//JScript
function RightClickTrayIcon(Name, ItemName)
{
var p, tray, show_button;
// Gets the tray
p = Sys.Process("Explorer");
tray = p.Window("Shell_TrayWnd").Window("TrayNotifyWnd");
show_button = tray.WaitWindow("Button", "");
show_button.Click();
aqUtils.Delay(1000);
// Right-clicks the application icon
tray.Window("SysPager").Window("ToolbarWindow32", "Notification Area").
ClickItemR(Name);
// Selects an item from the context menu
tray.PopupMenu.Click(ItemName);
}
function TestClickTray()
{
RightClickTrayIcon("Volume", "Open Volume Control");
}