2014-02-06 24 views

回答

1

你想用這個應用程序做什麼?啓動它?以下示例基於應用程序名稱右鍵單擊系統托盤中的圖標:

//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"); 
    } 
+0

謝謝Tanya。我需要右鍵單擊應用程序圖標。但我需要在Win7和Win8中執行此操作。兩個腳本都可以使用相同的腳本嗎? – user2993178

+0

對於Win 8(安裝在我的機器上),它可以工作。我認爲它也可以在Win 7上運行。試一試。 – Tanya

+0

它適用於有按鈕的通知區域,但如何在沒有按鈕時使其工作? – user2993178

相關問題