Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Autohotkey I';我试图通过自动热键改变一个音符的字体颜色_Autohotkey_Onenote - Fatal编程技术网

Autohotkey I';我试图通过自动热键改变一个音符的字体颜色

Autohotkey I';我试图通过自动热键改变一个音符的字体颜色,autohotkey,onenote,Autohotkey,Onenote,我在自动热键转换器中使用此代码,因为我想按,例如: “ctrl+alt+r”更改字体颜色 SetTitleMatchMode, RegEx ; match window titles by regular expressions #IfWinActive - OneNote$ ; ------ only in windows with title ending with "- OneNote" ^!p::Send, !hfca!hfc{Down 7}{Right 4}{Enter} ^!r:

我在自动热键转换器中使用此代码,因为我想按,例如: “ctrl+alt+r”更改字体颜色

SetTitleMatchMode, RegEx ; match window titles by regular expressions

#IfWinActive - OneNote$ ; ------ only in windows with title ending with "- OneNote"

^!p::Send, !hfca!hfc{Down 7}{Right 4}{Enter}
^!r::Send, !hfcm^{PgDn}!r255{Tab}5{Tab}0{Enter} ; red (255, 0, 0)
^!b::Send, !hfcm^{PgDn}!r0{Tab}5{Tab}255{Enter} ; blue (0, 0, 255)
^!a::Send, !hfca ; automatic color (i.e. reset font color to "none")

#IfWinActive ; ------ end of section restricted to specific windows

我通过.exe文件执行了这段代码,但什么也没发生

这对我来说很有效。我打开OneNote.exe(不是UWP)并尝试了您的每个热键;每一个都起作用了。注意:
^{PgDn}
将返回到第一个选项卡,如果
^!r
^!b热键使用次数为偶数;“红色”热键实际上将颜色设置为255、5、0,“蓝色”设置为0、5、255。此外,使用
ControlSend
或COM控制OneNote可能更可靠。“我通过.exe文件执行了此代码,但什么也没发生”是什么意思?你的脚本编译好了吗?