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-06-25 08:24
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [vbs]Shut down after 1 hour View 2,043 Replies 8
Original Poster Posted 2008-12-19 11:06 ·  中国 广东 揭阳 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
Still that sentence: just learning VBS and find it interesting

Recently I've been playing computer like crazy, always forgetting to pay attention to rest, so I made this

Something that prompts and shuts down after an hour

The prompt is in English. My English is bad, please give me more advice.

wscript.sleep 3600000

set w=createobject("wscript.shell")

w.popup "Hey!" & vbcrlf _
& "You are run out of 1 hours," & vbcrlf _
& "I will close windows," & vbcrlf _
& "you are also have 60 seconds to finsh your work!",5,"Hey!",4096

wscript.sleep 15000
w.popup "Only 40 minutes.",2,"Hey!",4096

wscript.sleep 18000
w.popup "Only 20 minutes.",2,"Hey!",4096

wscript.sleep 18000
w.run "cmd /c shutdown -s -t 00",vbhide
wscript.quit


'"C:\Documents and Settings\All Users\「开始」菜单\程序\启动"


Put it under the startup items

[ Last edited by 523066680 on 2008-12-19 at 13:38 ]
Floor 2 Posted 2008-12-19 11:40 ·  中国 广东 深圳 电信
初级用户
★★
游手好闲 + 无所事事 ..
Credits 194
Posts 167
Joined 2007-04-30 09:43
19-year member
UID 87022
Gender Male
Status Offline
How boring! After booting for an hour, it prompts to shut down... Haha
Floor 3 Posted 2008-12-19 13:39 ·  中国 广东 揭阳 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
The code has been modified, and a bug was found. When it is named shutdown.vbs, it falls into an infinite loop... Because.....
Floor 4 Posted 2008-12-19 16:50 ·  中国 广东 广州 电信
初级用户
★★
l i u s s
Credits 73
Posts 101
Joined 2008-09-17 00:21
17-year member
UID 125825
Gender Male
From GZ
Status Offline
I have the same feeling as the original poster, so I also made a timing reminder to control myself:

http://www.cn-dos.net/forum/viewthread.php?tid=45975&fpage=1&highlight=%2B

[ Last edited by newxso on 2009-2-10 at 18:01 ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
523066680 +5 2008-12-20 16:49
Floor 5 Posted 2008-12-20 16:50 ·  中国 广东 揭阳 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
Hey, can also boot up and play music automatically, and shut down automatically after 1 hour. I can sleep peacefully.....
Floor 6 Posted 2008-12-25 14:39 ·  中国 山东 青岛 联通
初级用户
★★
Credits 107
Posts 60
Joined 2007-11-07 22:03
18-year member
UID 102010
Gender Male
Status Offline
The one on the 4th floor is good, but it uses nearly 10M of memory!
Floor 7 Posted 2008-12-25 15:16 ·  中国 北京 鹏博士长城宽带
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
People like me who often play games late at night and don't want to go to sleep. Should I make a script to power on the computer at midnight or if the computer is still on, format the hard drive?

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 8 Posted 2009-09-30 21:46 ·  中国 广东 广州 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
Back then, Yishanju spoke very extremely...
Floor 9 Posted 2009-10-02 00:49 ·  中国 北京 朝阳区 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
The so - called if you take it seriously, you lose

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Forum Jump: