echo off & setlocal enabledelayedexpansion
setlocal enabledelayedexpansion
title 随机数定位
set /p abc=输入要得到的数值
set a=1
set b=99
set /a c=!b!-!a!+1
for /l %%i in (1,1,100) do (
set /a d=!random!%%!c!+!a!
echo.
if /i !d!==%abc%%time%>>1-99.txt
)
pause
echo off
setlocal enabledelayedexpansion
set aa=1 2 3 4 5 6 7 8 9
set aa=%aa%
:Beginning
echo Please waiting...
for /f "delims=" %%r in ('echo %!aa!%') do set currandom=%%r
for /f "delims=" %%t in ('echo %Time%') do set curtime=%%t
echo %currandom%>>1ddd.txt
if %currandom% equ 1 echo Get %currandom% at %curtime% && goto end
::if %currandom% leq 9 echo Get %currandom% at %curtime% && goto End
if %ErrorLevel% equ 0 goto Beginning
@echo off
setlocal enabledelayedexpansion
set aa=1 2 3 4 5 6 7 8 9
:Beginning
echo Please waiting...
for /f "delims=" %%r in ('echo %aa%') do set currandom=%%r
for /f "delims=" %%t in ('echo %Time%') do set curtime=%%t
echo %currandom%>>1ddd.txt
if %currandom% equ 1 echo Get %currandom% at %curtime% && goto end
::if %currandom% leq 9 echo Get %currandom% at %curtime% && goto End
if %ErrorLevel% equ 0 goto Beginning
:End