Question about Random

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
OldGeek
Junior Coder
Posts: 21
Joined: Thu Oct 30, 2014 11:49 am
Location: Upstate NY, USA

Question about Random

Post by OldGeek » Thu May 11, 2023 2:33 pm

I understand computers can not actually generate true random numbers. I'm comming from a VisualBasic background. Using VB the standard was to use a random seed (like MS has). I always used VB's Date/Time number as a seed.

But I could not find the range value to use when doing this in MS so what to the range value for RND_SEED?

Thank You in advance for your help
MS v15 | Windows 11 Pro | NY, USA

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Question about Random

Post by Dorian (MJT support) » Thu May 11, 2023 3:23 pm

Apologies for the brief reply... I'm answering from my phone.

You can set the seed.


https://www.mjtnet.com/manuals/b/v15/in ... ntext=3190

The seed is set automatically and is stored in the RND_SEED variable. It is possible to set the seed programmatically by modifying the value of RND_SEED
Yes, we have a Custom Scripting Service. Message me or go here

OldGeek
Junior Coder
Posts: 21
Joined: Thu Oct 30, 2014 11:49 am
Location: Upstate NY, USA

Re: Question about Random

Post by OldGeek » Thu May 11, 2023 5:31 pm

Thank you for your help
MS v15 | Windows 11 Pro | NY, USA

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Question about Random

Post by Dorian (MJT support) » Thu May 11, 2023 5:48 pm

This thread might help you :

viewtopic.php?f=2&t=8186&hilit=random+seed
Yes, we have a Custom Scripting Service. Message me or go here

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts