简体   繁体   English

使用 AutoHotkey 保持窗口最大化?

[英]Keep window maximized with AutoHotkey?

I have an AutoHotkey script that launches an application maximized like this:我有一个 AutoHotkey 脚本,它启动一个最大化的应用程序,如下所示:

`Run, myprogram.exe,, Max`

It then gets rid of the minimize and restore buttons.然后它摆脱了最小化和恢复按钮。 I can still click on the task bar and drag downwards to restore the window.我仍然可以单击任务栏并向下拖动以恢复窗口。 Is there any good way to keep my window maximized in AHK?有什么好的方法可以让我的窗口在 AHK 中最大化? How about just locking the window's position?只锁定窗口的位置怎么样?

Does the F11 key maximize the app? F11 键是否最大化应用程序? When in F11 mode most apps completely lose their title bar.在 F11 模式下,大多数应用程序完全失去了标题栏。
If so, run the app then send an F11 key (You may need to wait a bit for the app to be active or something).如果是这样,请运行该应用程序,然后发送 F11 键(您可能需要等待该应用程序处于活动状态或其他什么)。
Failing that, yes you could have an infinite loop running that monitored the window position / size (WinGetPos) and if it was not at 0,0 and the size of the screen (A_ScreenWidth, A_ScreenHeight), then move it to that position and size (WinMove).如果失败,是的,您可以运行一个无限循环来监控窗口位置/大小(WinGetPos),如果它不是 0,0 和屏幕大小(A_ScreenWidth、A_ScreenHeight),则将其移动到该位置和大小(WinMove)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM