
たとえば、すべての単語 test が test に置き換えられます。
:*?:test::test2
これは動作しますが、指定された単語「test2」を強調表示したいと思います。
答え1
次のように試してください:
#NoEnv
#SingleInstance Force
; Create a group of the windows you want to execute this or more hotstrings in the auto-execute section (top of the script):
; ahk_group Editors_Group
GroupAdd, Editors_Group, ahk_class Notepad
GroupAdd, Editors_Group, ahk_class Notepad2
GroupAdd, Editors_Group, ahk_class Notepad++
GroupAdd, Editors_Group, ahk_class WordPadClass
; ...
RETURN ; === end of auto-execute section ===
; and use the #IfWinActive directive to make the hotstrings context-sensitive:
#IfWinActive, ahk_group Editors_Group
:*?:test::
Send {Text} test2
Send {Blind}{Text}testing
SendInput, ^+{Left}{Left}^+{Right}
return
; ...
#IfWinActive ; turn off context sensitivity
見るグループ追加、#もしWinがアクティブならそして送信ドキュメントに記載されています。