China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 13:50
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Batch screen saver View 2,891 Replies 11
Original Poster Posted 2010-06-06 16:47 ·  中国 江西 南昌 电信
初级用户
Credits 38
Posts 21
Joined 2010-02-21 18:11
16-year member
UID 160939
Gender Male
From 南昌
Status Offline
@echo off
title Batch Screen Saver
echo exit|%ComSpec% /k prompt e 100 B4 00 B0 12 CD 10 B0 03 CD 10 CD 20 $_g$_q$_|debug>nul
chcp 437>nul
graftabl 936>nul
:a
set /a l=%random%%%24
cls
for /l %%i in (1 1 %l%) do (echo.)
echo. To exit, press Ctrl+c.
ping -n 3 127.0.1>nul
set /a c=%random%%%16
if %c%==10 set c=a
if %c%==11 set c=b
if %c%==12 set c=c
if %c%==13 set c=d
if %c%==14 set c=e
if %c%==15 set c=f
color %c%0
goto a
Adopts the most CPU-efficient way
The author's CPU usage only徘徊 between 0%-4% during use.



It seems no one is replying???
A bit cold

[ Last edited by zcydez on 2010-6-6 at 16:56 ]
Floor 2 Posted 2010-06-06 19:48 ·  中国 山东 联通
初级用户
Credits 38
Posts 24
Joined 2010-03-21 19:42
16-year member
UID 162709
Gender Male
Status Offline
Thanks to the LZ for sharing.
I'll also post one.

@echo off
:begin
set /a a=%random%/3640&set /a b=%random%/3640
:1
set /a c=%random%/328
if %c% leq 13 goto 1
:2
set /a d=%random%/1092
if %d% leq 1 goto 2
title 哈哈!无穷变幻的窗口哦&color %a%%b%&mode con cols=%c% lines=%d%&ping/n 1 127.1>nul&cls&echo.&echo.&echo.&echo.&goto begin

Collected online by myself
Floor 3 Posted 2010-06-06 23:12 ·  中国 浙江 杭州 电信
新手上路
Credits 12
Posts 11
Joined 2008-10-13 12:17
17-year member
UID 128246
Gender Male
Status Offline
Can't run under win7 CMD
Floor 4 Posted 2010-06-09 21:09 ·  中国 浙江 嘉兴 电信
中级用户
★★
Credits 360
Posts 216
Joined 2007-05-29 17:41
19-year member
UID 89677
Gender Male
Status Offline
Not bad, not bad. However, can it achieve the batch processing to turn off the monitor immediately to advocate low-carbon life??

[ Last edited by bd123456789 on 2010-6-10 at 06:52 ]
Floor 5 Posted 2010-06-10 15:16 ·  新加坡
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
google search MonitorOff.exe
Floor 6 Posted 2010-06-10 18:45 ·  中国 江西 南昌 电信
初级用户
Credits 38
Posts 21
Joined 2010-02-21 18:11
16-year member
UID 160939
Gender Male
From 南昌
Status Offline
What is the purpose of searching for MonitorOff.exe?
Floor 7 Posted 2010-07-29 15:53 ·  中国 湖北 武汉 电信
新手上路
Credits 1
Posts 1
Joined 2010-07-23 17:18
16-year member
UID 171061
Gender Female
Status Offline
It has no practical meaning. It would be great if it could respond to keyboard and mouse actions. For example, the screen saver automatically exits when you move the keyboard.
Floor 8 Posted 2010-07-29 16:21 ·  中国 广东 广州 番禺区 电信
初级用户
★★
Credits 111
Posts 62
Joined 2007-12-31 20:10
18-year member
UID 107336
Gender Male
Status Offline
@echo off&setlocal enabledelayedexpansion
if "%~1"=="" (
start /b "" cmd /c "%~f0" 123
for /l %%a in (0,0,0) do (
cls
echo !time! !date!
ping -n 1 127.0.0.1 >nul
)
)
pause>nul
taskkill /f /fi "windowtitle eq %comspec%" /im cmd.exe

Basically achieves closing on key press...
I won't do full screen, Vista and Win7 can't go full screen, I can't test here...
Floor 9 Posted 2010-08-13 13:40 ·  中国 江西 南昌 电信
初级用户
Credits 38
Posts 21
Joined 2010-02-21 18:11
16-year member
UID 160939
Gender Male
From 南昌
Status Offline
Thanks 5L
It turns out to be turning off the monitor
Floor 10 Posted 2010-10-29 16:16 ·  中国 广东 珠海 电信
初级用户
Credits 45
Posts 27
Joined 2010-10-20 04:03
15-year member
UID 176155
Gender Male
From 广东
Status Offline
Thank you for serving the public.
Floor 11 Posted 2010-12-31 18:24 ·  中国 广东 汕头 电信
新手上路
Credits 13
Posts 10
Joined 2010-12-31 01:39
15-year member
UID 180112
Gender Male
Status Offline
Learning
Floor 12 Posted 2010-12-31 18:24 ·  中国 广东 汕头 电信
新手上路
Credits 13
Posts 10
Joined 2010-12-31 01:39
15-year member
UID 180112
Gender Male
Status Offline
Post #2 is good.
Forum Jump: