我不是编码员,但我发现AHK很有用
目前我有一个小脚本可以打开和关闭widows按钮(启用和禁用),我只需要添加一些文本来指示它是打开还是关闭,我目前找到了一个可写入&的GUI脚本#34;上"但是id没有任何其他功能(所以on消息永远停留在屏幕上)
我目前的剧本是:
PrintScreen::Send #{PrintScreen}
LWin::Return
RWin::Return
#If GetKeyState("CapsLock","T")
LWin::Send #{PrintScreen}
RWin::Send #{PrintScreen}
#If
f12::
Suspend
#SingleInstance, force
Gui, Color, White
Gui, -caption +toolwindow +AlwaysOnTop
Gui, font, s30 bold, Arial
Gui, add, text, vTX cRed TransColor, On
Gui, Show, % "x" A_ScreenWidth-300 " y" A_ScreenHeight-130 ,TRANS-WIN
WinSet, TransColor, White, TRANS-WIN
return
OnOff:
GuiControl, % (toggle := F12 ) ? "Hide" : "Show", TX
return
ExitApp
GuiEscape:
ExitApp
return
return
你们可以帮助我吗?
答案 0 :(得分:0)
经过测试工作:
PrintScreen::Send #{PrintScreen}
LWin::
RWin::Return
#If GetKeyState("CapsLock","T")
LWin::
RWin::Send #{PrintScreen}
#If
F12::
Suspend
ShowOnOff()
Return
ShowOnOff() {
Static TX
If (TX = "") {
Gui Color, White
Gui -caption +toolwindow +AlwaysOnTop
Gui font, s30 bold, Arial
Gui add, text, vTX cRed TransColor, On
Gui Show, % "x" A_ScreenWidth-300 " y" A_ScreenHeight-130, TRANS-WIN
WinSet TransColor, White, TRANS-WIN
TX := "On"
} Else
GuiControl % A_IsSuspended ? "Show" : "Hide", TX
}