重新最大化最小化的桂

时间:2016-11-20 17:54:10

标签: autohotkey

是否可以防止Gui在WIN + D快捷方式上最小化?

这样做的一种方法是不时检查Gui元素是否被最小化并重新最大化。但我不知道该怎么做。

我正在使用的一个非常简单的示例脚本作为参考

Gui +LastFound -Caption +ToolWindow -SysMenu

Gui, Color, 000000

Gui, Font, FF0000
Gui, Font, s12
Gui, Add, Text, vTxt cWhite, XXXXX YYYYY  ; XX & YY serve to auto-size the window.

WinSet, TransColor, 0
SetTimer, UpdateOSD, 200

Gosub, UpdateOSD  ; Make the first update immediate rather than waiting for the timer.
Gui, Show, x10 y10, NoActivate; NoActivate avoids deactivating the currently active window.
return

UpdateOSD:
MouseGetPos, MouseX, MouseY
GuiControl,, Txt, X %MouseX%, Y %MouseY%
return

感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

您可以使用上下文敏感度来找出您处于活动状态的GUI,然后编写标准按钮按下快捷键,然后无处可用

#IfWinActive Untitled - Notepad
  #d::
    MsgBox , , Winkey + D pressed, You were inside a new untitled notepad and pressed Windows key + D but I stopped all actions
   ; Do nothing now
  return
#IfWinActive

我刚试过它......我将它键入简单的记事本,对我有用。

Added a screenshot of the result

相关问题