QUOTE (TsunamiZ @ Jul 1 2009, 07:16 AM)

yes, you understand me correctly. it would be great to see how it can be done.

I have what I believe to be a working model for your macro.
QUOTE
BTW: it seems macro express' random integer generator might have a slight bug, and generates the same number twice in a row too often. even if i set the number range higher, the frequency of the problem occuring still seems the same.
That is weird. I haven't noticed that, myself, but I don't work with randoms very often. My wife is a highschool Mathematics and Statistics teacher, and she
has told me that not even computers have the capacity to generate completely random sequences. An underlying pattern always emerges.
Of course, I argue that true randomness will always generate the appearance of a pattern. They say if you give a monkey a typewriter and infinite time, and he
will eventually produce the complete works of Shakespear - I think that's false, because the monkey will likely develop a preference for a specific key. However,
if you replace the monkey with a computer typing randomly for infinite time, you will end up with the complete works of Shakespear (and everything else ever
written - or that ever will be written - by man... and probably some really good recipes, too).
With that said, if you think there is a definite problem with the randomness of the program, I'd suggest contacting ISS support directly.
Now, on to the fun.
This macro is a bit longer than I had expected, but still very reasonable. The prompts at the beginning can be removed, as long as you know you will always use
the same minimum and maximum numbers. Just set N4 to you standard minimum and N3 to your standard maximum and remove the prompts.
CODE
// %N1% Random Number
// %N2% Previously Generated Random Number
// %N3% Maximum Value of Randomly Generated Number
// %N4% Minimum Value of Randomly Generated Number
// Note: The Random Number Generator has a minimum default of 0 wich cannot be changed.
// __Because of this, we have to manipulate the values of %N1% and %N3%
// __I will set these manipulations apart in the body of the text with surrounding *** Remarks
// __When N1 is generated it could = 0. If the min is set at 1, then N1 must be increased
// __by the value of N4 (in this case, 1) in order to ensure N1 >= 1.
// __If the max (N3) is 10, then increasing N1, could result in N1 > N3 (which we must avoid.).
// __So we start by reducing N3 by the value of N4 to ensure that when N1 is increased,
// __N1 does not exceed N3.
// %T1% Text Variable Used to Facilitate New and Old Number Comparisons
// %HOMEDRIVE%%HOMEPATH% - Essentially represents C: Drive and your default folder.
// This may be different for every computer, so I used these defaults because they should work for anybody.
Variable Set Integer %N4% to 1
Variable Set Integer %N4% from Prompt
Variable Set Integer %N3% to 10
Variable Set Integer %N3% from Prompt
// ***
Variable Modify Integer: %N3% = %N3% - %N4%
// ***
Repeat Until %T1% <> %T1%
If File Exists "%HOMEDRIVE%%HOMEPATH%/Random Number"
Variable Set String %T1% from File: "%HOMEDRIVE%%HOMEPATH%/Random Number"
Variable Modify String: Convert %T1% to integer %N2%
Else
Variable Set Integer %N2% to %N3%
Variable Modify Integer: Inc (%N2%)
End If
Variable Set Integer %N1% with a Random Number
// ***
Variable Modify Integer: %N1% = %N1% + %N4%
// ***
If Variable %N1% <> variable %N2%
Variable Modify Integer: Convert %N1% to text string %T1%
Variable Modify String: Save %T1% to Text File
Break
End If
Repeat End
Text Box Display: This Text Box Represents The Rest of Your Macro
CODE
<REM2:%N1% Random Number><REM2:%N2% Previously Generated Random Number><REM2:%N3% Maximum Value of Randomly Generated Number><REM2:%N4% Minimum Value of Randomly Generated Number><REM2:><REM2:Note: The Random Number Generator has a minimum default of 0 wich cannot be changed.><REM2:__Because of this, we have to manipulate the values of %N1% and %N3%><REM2:__I will set these manipulations apart in the body of the text with surrounding *** Remarks><REM2:__When N1 is generated it could = 0. If the min is set at 1, then N1 must be increased ><REM2:__by the value of N4 (in this case, 1) in order to ensure N1 >= 1.><REM2:__If the max (N3) is 10, then increasing N1, could result in N1 > N3 (which we must avoid.). ><REM2:__So we start by reducing N3 by the value of N4 to ensure that when N1 is increased, ><REM2:__N1 does not exceed N3.><REM2:><REM2:%T1% Text Variable Used to Facilitate New and Old Number Comparisons><REM2:%HOMEDRIVE%%HOMEPATH% - Essentially represents C: Drive and your default folder.><REM2:This may be different for every computer, so I used these defaults because they should work for anybody.><IVAR2:04:01:1><IVAR2:04:02:FWhat is the minimum random value?FFCenter:Center><IVAR2:03:01:10><IVAR2:03:02:FWhat is the maximum random value?FFCenter:Center><REM2:***><NMVAR:02:03:1:0000003:1:0000004><REM2:***><REP3:08:000002:000001:0001:1:01:T1><IFOTH:01:2:%HOMEDRIVE%%HOMEPATH%/Random Number><TVAR2:01:04:%HOMEDRIVE%%HOMEPATH%/Random NumberT><TMVAR2:05:01:02:000:000:><ELSE><IVAR2:02:01:%N3%><NMVAR:08:02:0:0000001:0:0000000><ENDIF><IVAR2:01:06:%N3%><REM2:***><NMVAR:01:01:1:0000001:1:0000004><REM2:***><IFVAR2:5:01:2:N2><NMVAR:05:01:0:0000001:0:0000000><TMVAR2:17:01:00:000:000:%HOMEDRIVE%%HOMEPATH%/Random NumberF><BREAK><ENDIF><ENDREP><TBOX4:T:1:CenterCenter000278000200:000:This Text Box Represents The Rest of Your MacroCurrent Number: %N1%>