JugglesIt Posted June 13, 2017 Share Posted June 13, 2017 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 EndIf So if the number is <0.05 out of 1, it will perform the action. Thanks for the help Link to comment Share on other sites More sharing options...
Subz Posted June 14, 2017 Share Posted June 14, 2017 Have you looked at Random function? Link to comment Share on other sites More sharing options...
LerN Posted June 14, 2017 Share Posted June 14, 2017 Something like that ? $x = Random(-1,2) if $x < 0.5 Then MsgBox(0,"","The random number equals ->"&$x&" and do action is enabled") EndIf Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now