Andrius,
Похоже, что работает со многими полноэкранными играми:
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
Успех