Im sorry but could u please explain it? For example, what i am supposed to write in list.txt? And how does it work?
Sorry but im completely lost here
Thanks for answering anyway.
So, I will start off explaining what needs to be in list.txt. This is what you could put in list.txt
1 Word1
2 Word2
3 Word3
4 Anotherword
5 ...
6 get_the_picture?
Now, I will re-post the script, with comments explaining how the code works.
@echo off
rem Turns echoing commands on-screen to off.
set /a rnd=%random%%%10
rem Gets a random number from 1-10.
for /f "tokens=1,2" %%a in (list.txt) do if %rnd%==%%a echo %%b
rem Taking the first two tokens of each line in list.txt delimited by spaces,
rem it will check if the first word is the same as the random number, and if it is,
rem it will display the second word.
rem
pause