Wed, 2 Jun 2004 17:05:57 +0200 (11:05 AM EDT here) Thomas Andersson wrote:

> Hi list,

> Is there a way to generate a random integer within a template? I
> want to pick a random line in a textfile to inlclude in my template.

> Example: %Getline("random_number_here","%Include='d:\magicfile.txt")

From the MyMacros Help file:

%Random
=======

Definition
  
  %Random(min, max)
  
  
Description
  
  Random integer value between Min and Max inclusively.
  
  
Example
  
  %Random("5","10")


I tried %Random(0,1000000000) in a test QT. FWIW, the first five calls
to the QT yielded the following "random" numbers:

                564250121

                841478516

                131415970

                281965412

                698447296



Using: The Bat! v2.10.03, BayesIt! 0.5.4, MyMacros 1.10
       Windows 2000 v5.0 - Build 2195 - Service Pack 4



-- 

Daniel A. Grunberg       Kensington, Maryland, USA
homepage: www.nyx.net/~dgrunber/


________________________________________________
Current version is 2.11.00 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to