Re: [AHK-] 想請教以下幾個程式碼的用法

作者: bhbbbbb (影)   2022-07-07 01:50:19
※ 引述《onlyAPU (Nothing)》之銘言:
: 各位板友好,之前有從網路上找了兩段程式碼來使用
: 使用上都十分正常沒有問題,但是最近有想要修改一些東西
: 發現裡面有些東西看不懂是甚麼意思,特來請教
: No.1 功能: 單點x 快速點兩下ctrl+x
: #ifwinactive ahk_exe SketchUp.exe
: ~x:: /*請問~符號的意思
https://www.autohotkey.com/docs/Hotkeys.htm#Tilde
可以試試
a::b
~a::b
的不同
: IF !(A_TickCount < x) /*A_TickCount是公用的變數還是自訂的
https://www.autohotkey.com/docs/Variables.htm#TickCount
是 built-in variable
: {
: KeyWait, x
: x:= A_TickCount + 200
: Return
: }
: LAlt = /*這句是甚麼功用呢
相當於 LAlt := ""
: Send ^+x
: Return
: #ifwinactive
: No.2 功能: 按下S之後六秒,再按九宮格的ENTER會多輸入mm
: ;sketchup裡面不用輸入mm
: #ifwinactive ahk_exe sketchup.exe
: ~s:: /*~是甚麼功能
: SetTimer gTmr,-6000
: gChk:=1
: Return
: #If gChk /*為什麼後面沒有=,是不寫東西就會自動=1?
應該說 gChk 會先被轉成 boolean 再看看是否等於 true
在 ahk 中 0 是 false ,1 是 true。
: NumpadEnter::send mm{enter}
: #If
: gTmr:
: gChk:=0
: Return
: #ifwinactive
作者: kslman   2022-08-17 13:23:00
感謝大大,但我的AHK_L v1.1.30.03運作不起來推錯

Links booklink

Contact Us: admin [ a t ] ucptt.com