- @echo off&setlocal enabledelayedexpansion
- :start
- set/a a=0,b=0,n=0,u=0,v=0,r=0
- (for /f "tokens=1-2 delims=:" %%i in ('type "A.txt"^|find /v /c "" ^&type "A.txt"^|findstr -Rn ".*"') do (
- set/a a+=1
- if !a! equ 1 set/a "n=%random%%%%%i"
- if !n! neq 0 (set/a u+=1) else (goto :start)
- if !u! neq 1 if %%i equ !n! set/p=%%j<nul&call :a&exit /b
- )) >>C.txt
- :a
- set/a a=0,b=0,n=0,u=0,v=0,r=0
- for /f "tokens=1-2 delims=:" %%i in ('type "B.txt"^|find /v /c "" ^&type "B.txt"^|findstr -Rn ".*"') do (
- set/a b+=1
- if !b! equ 1 set/a "r=%random%%%%%i"
- if !r! neq 0 (set/a v+=1) else (goto :a)
- if !v! neq 1 if %%i equ !r! set/p=%%j<nul&echo,&goto :eof
- )
复制代码 每点击一次,注入每次的随机提取数。 |