日历时钟3.0版:
闲着没事做,又搞了个升级版,又改了一些代码,还在想办法解决闰年时显示月份的bug,还望高手指教。
解决了关闭按钮只有指向才能有用的BUG,现在只有单击才有效~~~
小弟才12岁,现在读六年级,水平有限,还望大家多多关照。
新版和旧版都在附件里。
另外本批处理需要附加程序Cmos.exe、Curs.exe,都在附件里。
附加程序地址:http://bbs.bathome.net/thread-3148-1-1.html
点此下载:
链接: https://pan.baidu.com/s/1qnJzbYmY9aoT5Pd4_sEMyQ 提取码: ji71- @echo off
- title 日历时钟 QQ:1061159532
- echo.正在启动,请稍后
- mode con: cols=38 lines=18
- curs /crv 0
- set rq=
- set sj=
- set xq=
- set y=
- set r=
- set n=
- :a
- set ra=
- set rb=
- set rc=
- set +1=
- set y=%date:~5,-7%
- set r=%date:~8,-4%
- set n=%date:~0,-10%
- set xq=%date:~13,1%
- set sj=%time:~0,-9%时%time:~3,-6%分%time:~6,-3%秒
- if %xq% equ 六 (color fc&goto tgcolor) else (goto c1)
- :c1
- if %xq% equ 日 (color fc) else (color f0)
- :tgcolor
- if %y% equ 01 (set yue= 一月大)
- if %y% equ 02 (set yue= 二月小)
- if %y% equ 03 (set yue= 三月大)
- if %y% equ 04 (set yue= 四月小)
- if %y% equ 05 (set yue= 五月大)
- if %y% equ 06 (set yue= 六月小)
- if %y% equ 07 (set yue= 七月大)
- if %y% equ 08 (set yue= 八月大)
- if %y% equ 09 (set yue= 九月小)
- if %y% equ 10 (set yue= 十月大)
- if %y% equ 11 (set yue=十一月小)
- if %y% equ 12 (set yue=十二月大)
- set ra=%r:~0,-1%
- set rb=%r:~1,1%
- if %ra% equ 0 (
- set rc=y
- if %rb% equ 1 (
- set r1= █
- set r2= ██
- set r3= █
- set r4= █
- set r5= █
- set r6= █
- set r7= █
- set r8= ████
- )
- if %rb% equ 2 (
- set r1= ██
- set r2= █ █
- set r3= █
- set r4= █
- set r5= █
- set r6= █
- set r7= █
- set r8= ████
- )
- if %rb% equ 3 (
- set r1= ██
- set r2= █ █
- set r3= █
- set r4= █
- set r5= █
- set r6= █ █
- set r7= ██
- set r8=
- )
- if %rb% equ 4 (
- set r1= █
- set r2= █▌
- set r3= ██
- set r4= █ █
- set r5= █ █
- set r6= █████
- set r7= █
- set r8= █
- )
- if %rb% equ 5 (
- set r1= ███
- set r2= █
- set r3= █
- set r4= ███
- set r5= █
- set r6= █
- set r7= ███
- set r8=
- )
- if %rb% equ 6 (
- set r1= █
- set r2= █
- set r3= █
- set r4= █ █▋
- set r5= █▌ █
- set r6= █ █
- set r7= █ █
- set r8= █
- )
- if %rb% equ 7 (
- set r1= █████
- set r2= █
- set r3= █
- set r4= █
- set r5= █
- set r6= █
- set r7= █
- set r8= █
- )
- if %rb% equ 8 (
- set r1= ██
- set r2= █ █
- set r3= █ █
- set r4= ██
- set r5= █ █
- set r6= █ █
- set r7= ██
- set r8=
- )
- if %rb% equ 9 (
- set r1= ██
- set r2= █ █
- set r3= █ █
- set r4= ██
- set r5= █
- set r6= █ █
- set r7= ██
- set r8=
- )
- ) else (
- if %rb% equ 0 (
- set r9 =███
- set r10=█ █
- set r11=█ █
- set r12=█ █
- set r13=█ █
- set r14=█ █
- set r15=███
- set r16=
- )
- if %rb% equ 1 (
- set r9 = █
- set r10= █
- set r11= █
- set r12= █
- set r13= █
- set r14= █
- set r15= █
- set r16=
- )
- if %rb% equ 2 (
- set r9 =███
- set r10= █
- set r11= █
- set r12=███
- set r13=█
- set r14=█
- set r15=███
- set r16=
- )
- if %rb% equ 3 (
- set r9 =███
- set r10= █
- set r11= █
- set r12=███
- set r13= █
- set r14= █
- set r15=███
- set r16=
- )
- if %rb% equ 4 (
- set r9 =█ █
- set r10=█ █
- set r11=█ █
- set r12=███
- set r13= █
- set r14= █
- set r15= █
- set r16=
- )
- if %rb% equ 5 (
- set r9 =███
- set r10=█
- set r11=█
- set r12=███
- set r13= █
- set r14= █
- set r15=███
- set r16=
- )
- if %rb% equ 6 (
- set r9 =███
- set r10=█
- set r11=█
- set r12=███
- set r13=█ █
- set r14=█ █
- set r15=███
- set r16=
- )
- if %rb% equ 7 (
- set r9 =███
- set r10=█ █
- set r11= █
- set r12= █
- set r13= █
- set r14= █
- set r15= █
- set r16=
- )
- if %rb% equ 8 (
- set r9 =███
- set r10=█ █
- set r11=█ █
- set r12=███
- set r13=█ █
- set r14=█ █
- set r15=███
- set r16=
- )
- if %rb% equ 9 (
- set r9 =███
- set r10=█ █
- set r11=█ █
- set r12=███
- set r13= █
- set r14= █
- set r15=███
- set r16=
- )
- )
- if %ra% equ 1 (
- set r1= █
- set r2= █
- set r3= █
- set r4= █
- set r5= █
- set r6= █
- set r7= █
- set r8=
- )
- if %ra% equ 2 (
- set r1=███
- set r2= █
- set r3= █
- set r4=███
- set r5=█
- set r6=█
- set r7=███
- set r8=
- )
- if %ra% equ 3 (
- set r1=███
- set r2= █
- set r3= █
- set r4=███
- set r5= █
- set r6= █
- set r7=███
- set r8=
- )
- if not defined rc (
- set r1=%r1% %r9 %
- set r2=%r2% %r10%
- set r3=%r3% %r11%
- set r4=%r4% %r12%
- set r5=%r5% %r13%
- set r6=%r6% %r14%
- set r7=%r7% %r15%
- set r8=%r8% %r16%
- ) else (
- cls
- )
- :b
- cls
- echo.
- echo. ┌────────────────┐
- echo. │%n%年 日历时钟 %yue%│
- echo. ├────────────────┤
- echo. │%sj% │
- echo. │星期%xq% │
- echo. │ %r1% │
- echo. │ %r2% │
- echo. │ %r3% │
- echo. │ %r4% │
- echo. │ %r5% │
- echo. │ %r6% │
- echo. │ %r7% │
- echo. │ %r8% │
- echo. ├────────────────┤
- echo. │ 要退出,请单击此按钮→╳│
- echo. └────────────────┘
- Cmos 0 1 1 0 2
- set /a P=%errorlevel%
- if %P% lss 0 goto b
- set /a X=%P:~0,-3%
- set /a Y=%P%-1000*%X%
- if x%x%y%y% equ x34y16 (goto exit)
- if x%x%y%y% equ x35y16 (goto exit)
- goto a
- :exit
- cls
- color 07
- echo.正在退出,谢谢使用。
- set +1=
- set +=
- set rq=
- set sj=
- set xq=
- set y=
- set r=
- set n=
- set P=
- set P=
- set X=
- set ra=
- set rb=
- set rc=
- Cmos 3 1 1 0 2
复制代码
|