我希望能够通过按F1来切换Windows10中的F1主题。
在Windows 10中切换HighContrast主题的快捷方式是:
Left Alt + Left Shift + Print Screenhttps://msdn.microsoft.com/en-us/library/hh923906.aspx
这是我的剧本:
#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.
; Toggle HighContrast Theme: Alt + Shift + PrintScreen
F1::
Send !+{PrintScreen}
Return发布于 2018-01-04 14:59:57
您可以通过手动运行.theme文件来应用该设置。问题是它将打开“设置”对话框。此脚本将运行高对比度1主题文件,等待设置对话框打开,然后关闭它。
编辑:添加了代码在两个主题之间切换
hc := false
hctheme := "C:\Windows\Resources\Ease of Access Themes\hc1.theme"
stdtheme := "C:\Windows\Resources\Themes\theme1.theme"
; your personalized theme may be in
; C:\Users\{user.name}\AppData\Local\Microsoft\Windows\Themes\Custom.theme
F1::
hc := !hc
if (hc)
run %hctheme%
else
run %stdtheme%
WinWait Settings
WinClose Settings
return发布于 2018-01-03 12:38:31
用这个:
F1::
Send {LAlt down}{LShift down}{PrintScreen}{LAlt Up}{LShift Up}
return来自官方文档
按use down like:{LWin down} {RWin down}发布use use:{LWin up} {RWin up}
https://stackoverflow.com/questions/48077438
复制相似问题