@cyysu
        
        2017-10-12T10:21:09.000000Z
        字数 641
        阅读 1015
    
- 时间:2017年10月11日
 - 作者:Kali
 - 邮箱:cyysu.github.io@gmail.com/2869905223@qq.com/微信lwyx1413
 - 版本:4.0
 - 描述:批处理实战基础篇八,本次主要给出几个栗子。
 
Bat系列教程
@echo off&mode con cols=42 lines=20&color 0csetlocal enabledelayedexpansiontitle 数码雨-zw19750516set code=1 2 3 4 5 6 7 8 9 a b c d e f 0 &set m=1&set v=1:: 字符串替换操作 就是将空格替换为没有空格的set code1=!code: =!:begin:: %random% 为变量 %%表示取余数set /a a=%random%%%48set a=!code:~%a%,1!set str%m%=!str%m%!%a%set /a n+=1if %n% lss 40 goto beginset /a x+=1:: 条件满足替换颜色背景if %x% equ 20 call :lpclsfor /l %%i in (%m%,-1,%v%) do echo !str%%i!set /a m+=1if %m% geq 20 set /a v+=1set n=0&goto begin:: 更改颜色标签:lpset /a a=%random%%%15:: 表示取code1中第%a%位置后的下一个字符set a=!code1:~%a%,1!color 0%a%&set x=0
                    支付宝                                                         微信
