Chris Site Admin
Joined: 02 Mar 2004 Posts: 10464
|
Posted: Mon Aug 09, 2004 12:04 pm Post subject: |
|
|
Someone once mentioned that you can simply rename an EXE to have a .SCR extension and then use it as a screen saver -- though it probably needs to have certain design features to make sure it behaves correctly, i.e. that it turns itself off when the user returns (but maybe the OS does this automatically by telling the screensaver window to close).
As an alternative, something that should help to make your own screensavers is to use the A_TimeIdle variable (not supported in Windows 9x). For example:
| Code: | #Persistent
SetTimer, WatchForUserIdle, 30000 ; i.e. check every 30 seconds.
return ; End of auto-execute section (top part).
WatchForUserIdle:
; If last keystroke or mouse event was less than 10 minutes ago, do nothing.
if A_TimeIdle < 600000 ; See help file for alternative: A_TimeIdlePhysical
return
; Otherwise, the computer appears to be idle. Launch screensaver.
; But also watch for the user to return:
Run, MyScreenSaver.exe
SetTimer, WatchForUserReturn, 1000 ; Check more often to be responsive.
SetTimer, WatchForUserIdle, off
return
WatchForUserReturn:
if A_TimeIdle > 60000 ; User is still idle
return
; Otherwise, user has returned:
SetTimer, WatchForUserReturn, off
SetTimer, WatchForUserIdle, on
; And if necessary, do something here to stop your screen saver
; (depending on how it's designed, it might stop on its own).
return |
Also of interest is that Rajat made this nifty custom screen saver script. |
|