Problem with WinMaximize and fullscreen games

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
KilliK
Posts: 255
Joined: 10 Mar 2016, 21:19

Problem with WinMaximize and fullscreen games

29 Dec 2018, 21:47

Hello.

There is a common problem in Windows when running fullscreen games in lower resolution to that of the system's native resolution. The already opened windows get resized and re-positioned.

I have several games which cause this problem whenever I exit them or use alt+tab to switch from the game to the desktop.
I tried to use an AHK script to resolve this issue, but I came across another problem.

The WinMaximize command doesnt resize the affected windows. The WinGet, minmaxstate, MinMax, A command shows that the window is already maximized. If I use WinRestore first and then WinMaximize, the affected windows will finally get resized. The thing is how can I do this process only once to the affected windows, since there is no automatic way to trigger AHK?

more specifically, here is what I need to do:
1.run game which causes the problem
2.press alt+tab and switch to other windows
3.the script restores and maximizes those windows only one time
4.return to the fullscreen game
5.repeat the above

How do I approach this?

ps.I could use the size of the affected windows to determine if they need to get maximized, but there are some windows with default size lower than that of the screen, and AHK will think that it needs to maximize them too. I want to avoid that.
User avatar
Scr1pter
Posts: 1277
Joined: 06 Aug 2017, 08:21
Location: Germany

Re: Problem with WinMaximize and fullscreen games

30 Dec 2018, 08:01

Hi,

I have never faced this problem.
Probably because I run games in the same resolution.

Just one idea (even though I doubt it will help):
What if you minimize all windows and then start the game?
Just press Windows+D (show desktop) and run the game.
After closing it, check if the windows' positions have been changed.

P.S.
I believe Windows+D is the same as minimizing all windows manually.
(How else should it work anyway?)

Regards
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
User avatar
KilliK
Posts: 255
Joined: 10 Mar 2016, 21:19

Re: Problem with WinMaximize and fullscreen games

30 Dec 2018, 08:57

yeah, I have tried that. It works the first time, but if I press alt-tab again without having minimized the windows first, they get resized again.
I think I ll just create a windows group and have them restored/maximized whenever I press alt+tab.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: arrondark and 124 guests