Page 1 of 1

To keep a game windowed active

Posted: 04 Jan 2020, 17:18
by takayo97
I want to keep a running game windowed on active, to prevent my mouse clicked on the desktop accidentally.

Code: Select all

settimer, ontop, 500

ontop:
    WinActivate ahk_exe Diablo III64.exe


The timer is not working the script run once only

Re: To keep a game windowed active

Posted: 04 Jan 2020, 17:45
by gregster
https://www.autohotkey.com/docs/commands/SetTimer.htm#Remarks wrote:To keep a script running -- such as one that contains only timers -- use #Persistent.
I don't know your exact scenario - if it's a fullscreen window, perhaps you only need Winset with the subcommand AlwaysOnTop... Winset, AlwaysOnTop, On, ahk_exe Diablo III64.exe.

Re: To keep a game windowed active

Posted: 05 Jan 2020, 21:01
by takayo97
My lcd monitor is 19:10 which it's resolution is 1920x1200
I'm playing games in windows bordless mode, which is a small portion of desktop will shown at the top.
Sometimes it will miss click the desktop and lost the game window focus