1

如何使用 Autohotkey 脚本在全屏应用程序之上创建一个窗口?如果可能的话,任何窗口,或者至少是脚本创建的窗口。

4

2 回答 2

0

安德里斯,

似乎适用于许多全屏游戏的一个如下:

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

如果你想让这个交互,你可以使用类似的东西:

!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

成功

于 2012-01-15T15:21:38.673 回答
0

如果 SplashTextOn 或 SplashImage 不起作用,也不是Wicked here 的游戏特定子父设置,也不是库GPF,那么根据this,什么都不会或没有人管理过。编辑:我设法为任何全屏应用程序(而不仅仅是特定游戏)获得了上面的子父方法,如下所示,但当时的 Gui 仍然有问题:

WinGet, WinHND, ID, A   ;Get Handle of current fullscreen app
Gui,Vol:+0x40000000 -0x80000000 +Owner%WinHND%  ;MAke fullscreen app own our gui
于 2013-11-29T21:27:18.103 回答