Tuesday

.bat random number generator

here is example how to use random in bat files in simple 'guess number' game.
to call it : game.bat [total numbers to pick from] [your number]
for example : game.bat 6 3
 
set /a NUM = ( %1 * %random% ) / 32768 + 1
IF "%NUM%" EQU "%2" (echo "winner!") else (echo "loose %NUM%")


No comments:

imagemagic add text to image

rem different types of text annotations on existing images rem cyan yellow orange gold rem -gravity SouthWest rem draw text and anno...