Re: [AHK-] 僅在限定視窗內 用左鍵長按取代中鍵

看板EzHotKey作者 (胖克思)時間3年前 (2020/11/26 02:49), 3年前編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/3 (看更多)
※ 引述《bhbbbbb (斯馬克)》之銘言: : 我自己覺得你的想法是可以做到的,但實務上應該還是不太方便,例如反白之類的動作可能 : 也會出問題。 : 總之我用「先按著右鍵不放,再按下左鍵」的這個方法來取代中鍵 : 這樣的話就算是在其他的視窗應該也不太會出事(但下面的範例我還是讓他只在chrome中作用 我的想法是 能按一個鍵就不要按兩個 不然長期下來 手很酸 滑鼠游標長按500毫秒不動送出中鍵 不影響反白動作 試用了一下還滿順手的 以下code #if mouseover("chrome_renderwidgethosthwnd") ~Lbutton:: while (GetKeyState("lbutton" , "P")) { MouseGetPos, x1, y1 sleep 520 MouseGetPos, x2, y2 if (A_TimeSinceThisHotkey>500 and InStr(x1 . y1, x2 . y2) and (GetKeyState("lbutton" , "P"))) { send {lbutton up} send {mbutton} keywait, lbutton break } } return #if mouseover(class) { MouseGetPos,,,, OutputVarControl return InStr(OutputVarControl, class) } -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.34.215.74 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/EzHotKey/M.1606330170.A.C66.html ※ 編輯: panex0845 (1.34.215.74 臺灣), 11/26/2020 11:37:00
文章代碼(AID): #1VlgSwnc (EzHotKey)
文章代碼(AID): #1VlgSwnc (EzHotKey)