screen saver
Moderator: DosItHelp
screen saver
can u make a batch file open your screen saver over whatever it's doing?
Re: screen saver
Here's something I wrote several years ago to start a random screen saver. I don't have Win 7 to test it with but it still works in XP.
Code: Select all
@echo off
:: Start a random screensaver
if "%1"=="!" "Blank Screen.scr" /s & goto :EOF
set /a count=0
echo dummy>"%temp%.\scrnsaver.tmp"
for /f "delims=" %%a in (
'dir "%systemroot%\*.scr" /s /b ^|find /i /v ".script"'
) do echo %%a>>"%temp%.\scrnsaver.tmp"&set /a count+=1
ping -n 1 -w %random% 127.0.0.1 >nul
ping -n 1 -w %random% 127.0.0.1 >nul
ping -n 1 -w %random% 127.0.0.1 >nul
ping -n 1 -w %random% 127.0.0.1 >nul
ping -n 1 -w %random% 127.0.0.1 >nul
set /a ssnum=1+(%random% %% %count%)
if %ssnum% GEQ %count% %0
for /f "skip=%ssnum% delims=" %%a in (
'type "%temp%.\scrnsaver.tmp"') do (
if /i "%%~nxa"=="Blank Screen.scr" %0
if /i "%%~nxa"=="scrnsave.scr" %0
start "" "%%a" /s
del "%temp%.\scrnsaver.tmp"
goto :EOF
)