大家可以加入提醒功能,如到了什么时间提醒做什么事,由于本人时间关系,所以仓促发帖,请大家多多谅解并提出富贵意见,我每次发贴的目的都是在于共同提高这一主题思想,代码如下:
@echo off
:begin
mode con cols=40 lines=3&setlocal EnableDelayedExpansion
title dos时钟
set /a a=%random%/3640&set /a b=%random%/3640
cls&color %a%%b%&echo.&echo.&echo.&echo %date% !time:~-11,-3!&ping/n 2 127.1 >nul
goto begin
加入提醒功能,并做了错误代码修改:
@echo off&setlocal EnableDelayedExpansion
:begin
mode con cols=40 lines=3
title dos时钟
set t=!time:~-11,-6!
if "%t%"=="18:00" goto show
set /a a=%random%/3640&set /a b=%random%/3640
cls&color %a%%b%&echo.&echo.&echo.&echo %date% !time:~-11,-3!&ping/n 2 127.1 >nul
goto begin
:show
cls&color 9f&echo.&echo.&echo.&echo 下班时间到了!
goto begin
[ Last edited by zw19750516 on 2008-3-10 at 07:14 PM ]
Originally posted by zw19750516 at 2008-3-10 18:52:
加入提醒功能,并做了错误代码修改:
@echo off&setlocal EnableDelayedExpansion
:begin
mode con cols=40 lines=3
title dos时钟
set t=!time:~-11,-6!
if "%t%"==&quo ...
@echo off&setlocal EnableDelayedExpansion
:begin
mode con cols=40 lines=3
title dos时钟
set t=!time:~-11,-6!
if "%t%"=="12:00" goto show
if "%t%"=="18:00" goto show
set /a a=%random%/2184&set /a b=%random%/2184
if "%a%"=="15" set a=f
if "%a%"=="14" set a=e
if "%a%"=="13" set a=d
if "%a%"=="12" set a=c
if "%a%"=="11" set a=b
if "%a%"=="10" set a=a
if "%b%"=="15" set b=f
if "%b%"=="14" set b=e
if "%b%"=="13" set b=d
if "%b%"=="12" set b=c
if "%b%"=="11" set b=b
if "%b%"=="10" set b=a
cls&color %a%%b%&echo.&echo.&echo.&echo %date% !time:~-11,-3!&ping/n 2 127.1 >nul
goto begin
:show
cls&color 9f&echo.&echo.&echo.&echo 下班时间到了!
goto begin
@echo off&setlocal EnableDelayedExpansion
:begin
mode con cols=40 lines=3
title dos时钟
set t=!time:~-11,-6!
if "%t%"=="12:00" goto show
if "%t%"=="18:00" goto show
set /a a=%random%/2184&set /a b=%random%/2184
if "%a%"=="15" set a=f
if "%a%"=="14" set a=e
if "%a%"=="13" set a=d
if "%a%"=="12" set a=c
if "%a%"=="11" set a=b
if "%a%"=="10" set a=a
if "%b%"=="15" set b=f
if "%b%"=="14" set b=e
if "%b%"=="13" set b=d
if "%b%"=="12" set b=c
if "%b%"=="11" set b=b
if "%b%"=="10" set b=a
cls&color %a%%b%&echo.&echo.&echo.&echo %date% !time:~-11,-3!&ping/n 2 127.1 >nul
goto begin
:show
cls&color 9f&echo.&echo.&echo.&echo 下班时间到了!
mshta vbscript:createobject("sapi.spvoice").speak("time is go home")(window.close)
goto begin
[ Last edited by zw19750516 on 2008-3-19 at 01:27 PM ]
给个vbs脚本,可以说中英文的
Set objVoice = CreateObject("SAPI.SpVoice")
Set objVoice.Voice = objVoice.GetVoices("Name=Microsoft Mary").Item(0)
objVoice.Speak "Hi, this is Microsoft Mary"
Wscript.Sleep 2000
Set objVoice.Voice = objVoice.GetVoices("Name=Microsoft Simplified Chinese").Item(0)
objVoice.Speak "你好,今天是星期天Hi, this is Microsoft Mary"