Autohotkey make a window on top of fullscreen games

5.1k views Asked by At

how can I make a window on top of full screen applications using an Autohotkey script? Any window, if possible, or at least a window created by the script.

2

There are 2 answers

0
e-motiv On

If SplashTextOn or SplashImage doesn't work, nor a game specific child-parent setting by Wicked here, nor the library GPF , than according to this, nothing will or no-one has managed yet. EDIT: I managed to get the child-parent method above for any fullscreen application (and not just a specific game) as follows, but there is still something wrong with the Gui then:

WinGet, WinHND, ID, A   ;Get Handle of current fullscreen app
Gui,Vol:+0x40000000 -0x80000000 +Owner%WinHND%  ;MAke fullscreen app own our gui
1
Robert Ilbrink On

Andrius,

One that seems to work with many full screen games is the following:

SoundBeep 1000 , 1000 ; Alert the users
SplashTextOn, 300, 30, Homework, Start your homework NOW!
WinMove, Homework,, 0,0 ; Move the alert screen away from the center
Sleep, 4000 ; wait 4 seconds
SplashTextOff ; remove the text
Return

If you want to make this interactive, you could use something like:

!Esc::
SplashTextOn, 250,200,Power Options,S = Sleep`n`rR = Reboot`n`rP = Power down`n`rW = Wait`n`rEsc = keep working`n`r`n`rPC will automatically go to sleep after 10 seconds if no key is pressed!
SetTimer, GoToSleep, Off
Input, CI_KeyVar, I L1 T10
SplashTextOff
if ErrorLevel = Timeout
{
Run C:\Windows\System32\rundll32.exe powrprof.dll`,SetSuspendState 0`,1`,0
return
}
if (CI_KeyVar = "q")
{
  Return
}
if (CI_KeyVar = "s")
{
  Run C:\Windows\System32\rundll32.exe powrprof.dll`,SetSuspendState 0`,1`,0
  Return
}
if (CI_KeyVar = "r")
{
  run, Shutdown.exe /r /t 1 ; Reboot PC
  Return
}
if (CI_KeyVar = "p")
{
  run, Shutdown.exe /s /t 0 ; Shutdown PC
  Return
}
if (CI_KeyVar = "w")
{
SleepTime+=1
inputbox, Sleeptime, Minutes,,,400,110,,,,,%Sleeptime%
Sleeptimer+=%Sleeptime%
MySleeptimer:=Sleeptimer * 60000 ; 60`000 = 1 minute
if MySleeptimer = 0
{
  Return
}
TrayTip, Count Down,`n`nSleeping in %Sleeptimer% minutes`n`nPress Alt + Esc to cancel,10,1
SetTimer, GoToSleep, %Mysleeptimer%
}
Return

GoToSleep:
SetTimer, GoToSleep, Off
TrayTip, Sleep, Started
Sleep, 1000
run C:\Windows\System32\rundll32.exe powrprof.dll`,SetSuspendState 0`,1`,0
return

Success