1
我正在嘗試創建一個腳本,當按x
剪切時,c
複製,v
粘貼,如果ScrollLock打開。按ScrollLock鍵時執行操作AutoHotKey
這是我的腳本不工作,無論ScrollLock打開還是關閉,它都會執行剪切,複製和粘貼。
~ScrollLock::
KeyWait, ScrollLock
GetKeyState, ScrollLockState, ScrollLock, T
If ScrollLockState = D
{
x:: Send, ^x
c:: Send, ^c
v:: Send, ^v
}
而對於下面的腳本,我不能鍵入x
,c
和v
時ScrollLock鍵處於關閉狀態,但可以剪切,複製和粘貼時ScrollLock鍵上。
~ScrollLock::
KeyWait, ScrollLock
GetKeyState, ScrollLockState, ScrollLock, T
x::
If ScrollLockState = D
{
Send, ^x
return
}
c::
If ScrollLockState = D
{
Send, ^c
return
}
v::
If ScrollLockState = D
{
Send, ^v
return
}