R#Gv1.zip
After running RNG and setting (mini, max, and # created)
without quitting you may run RNG again and leave everything blank,
it remembers previously selected settings.
Code:
@echo off & setlocal EnableDelayedExpansion
:STRT
call:CHCS
:RNG
color 0b
cls
echo Set your Mini # in range, MINI -32768
set /p inputA=""
cls
echo Set your Max # in range, MAX 32768
set /p inputB=""
cls
echo Set # of randoms generated
set /p inputC=""
cls
color 56
echo ~ >> random#GEN_backup.txt
echo START TIME:%TIME% >> random#GEN_backup.txt
echo %inputC% randoms generated ranging from %inputA% to %inputB%.
echo %inputC% randoms generated ranging from %inputA% to %inputB%. >> random#GEN_backup.txt
echo - >> random#GEN_backup.txt
echo -
for /L %%a in (1 1 %inputC%) do (
call:rand %inputA% %inputB%
echo !RAND_NUM!
echo !RAND_NUM! >> random#GEN_backup.txt)
echo -
echo - >> random#GEN_backup.txt
echo END TIME:%TIME% >> random#GEN_backup.txt
echo. >> random#GEN_backup.txt
goto:STRT
:CHCS
color 0b
cls
echo """"" HEXTHAT's Random # Generator v1.1 """""
echo.
echo.
echo Selecting 1 will load RNG
echo Selecting 2 will Delete "random#GEN_backup.txt"
echo Selecting 3 will Quit
echo.
CHOICE /N /C:123 /M "PICK A NUMBER (1, 2, or 3)"%1
IF ERRORLEVEL ==3 GOTO QT
IF ERRORLEVEL ==2 GOTO DLT
IF ERRORLEVEL ==1 GOTO RNG
GOTO:EOF
:rand
color 42
SET /A RAND_NUM=%RANDOM% * (%2 - %1 + 1) / 32768 + %1
goto:EOF
:DLT
color 42
DEL /Q "random#GEN_backup.txt"
goto:CHCS
:QT
EXIT