mercredi 24 août 2016

How do I execute a string randomly?

I'm trying to execute the alphabet on cmd through a batch program randomly and I just can't get the random part. Here's the code

@echo off

set _a= ECHO "ABCD"

set _b= ECHO "EFGH"

set _c= ECHO "IJKL"

set _d= ECHO "MNOP"

set _e= ECHO "QRSTU"

set _f= ECHO "VWXYZ"

pause

:randomness

%_a%%_b%%_c%%_d%%_e%%_f%

goto randomness

The results are this "ABCD" ECHO "EFGH" ECHO "IJKL" ECHO "QRSTU" ECHO "VWXYZ" and so on and so forth. I just want to understand the workings of this kind of programming




Aucun commentaire:

Enregistrer un commentaire