看板 EzHotKey 關於我們 聯絡資訊
※ 引述《PHP5 (Powered by Zend Engine2)》之銘言: : 初學 AHK ,想寫一個function 如下 : 把判斷IfWinExist, Run 函式化 : RunOnce (ProgPath, Title="") : { : if (Title!="") : { : IfWinExist Title : { : WinActivate : return : } : } : Run ProgPath : } : #s:: RunOnce (sndvol32, Volume Control) : 但是不work : 不知道要怎樣才能達到我的要求? 改了一下 RunOnce(ProgPath, Title="") { if(Title!="") { IfWinExist, %Title% { WinActivate, A return } } Run, %ProgPath% } #s:: RunOnce("sndvol32", "Volume Control") -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 210.69.13.1 ※ 編輯: Lumania 來自: 203.67.27.182 (01/06 21:20)
PHP5:ok 感謝 !! , A <----是筆誤嗎? 01/07 10:45
Lumania:A 不是筆誤 是代表active window 的意思 改成%Title% 好了 01/08 13:39