1

私は最近キーボードを壊してしまい、オートホットキーでその場しのぎの非効率なプログラムを書いて修正しました。

これが私の現在のラップトップ キーボードの出力です: y = ry h = fh n = {enter}+n 6 = 46

現在、壊れたキーごとに 4 つの autohotkey ファイルを実行しています。以下はhのファイルです

たしかに

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

while true {

KeyWait, h,D
Sleep 20
Send {BS}
Send {BS}
Send {h}


}

4 つの .ahk ファイルを 1 つに結合するにはどうすればよいですか? そして、これを行うためのより良い方法はありますか?

** 編集 1 つのファイルでそれを行う方法を見つけましたが、n/enter キーが機能しません。

これがコードです...

stackadjust.ahk

:?*:fh::h
:?*:hf::h
:?*:ry::y
:?*:yr::y
:?*:46::6
:?*:64::6
:?*:n{Enter}::n
:?*:{Enter}n::n
4

2 に答える 2

2

最後の 2 つのエントリでは、次のコードを使用できます。

:*:n`n::n
:*:`nn::n

;Comment: `n = {Enter}
于 2013-06-10T11:25:09.920 に答える
1

キーボードがほぼ同時にダブル キーを送信する場合、それらをダブル ホットキーにすることができます。

このようにして、「怒り」などの単語を入力できます...

y & r::send, {blind}r
$y::send, {blind}y
$+y::send, {blind}Y
4 & 6::send, {blind}6
$4::send, {blind}4
$+4::send, {blind}$
f & h::send, {blind}h
$f::send, {blind}f
$+f::send, {blind}F
n & Enter::send, {blind}n
$n::send, {blind}n
$+n::send, {blind}N
$Enter::
if (A_PriorHotkey = "n") and (A_TimeSincePriorHotkey < 500)
{
  Soundbeep, 500, 200
  return
}
Send, {Enter}
return

"blind" (shift、alt、ctrl ステータスに対して) を送信する必要はおそらくありませんが、害はありません。更新: Enter がスタックしているように見えるので、最後の n から 500ms まで Enter を削除します。この場合、私は注意を与えるためにビープ音を鳴らしています。

于 2013-06-10T13:23:18.797 に答える