Jump to content

How to perform action randomly

Recommended Posts

Hey guys, I'm pretty fluent in java, but I am trying to make an automated program using auto it. 

I was wondering if there was a function similar to Math.Random(); in this.

Something that will generate an odd randomly and if the odd is selected, it will perform the action.

For example, in java you would do

x = Math.Random();

if (x<0.05) Then 

//do action



So if the number is <0.05 out of 1, it will perform the action.

Thanks for the help

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...