Jump to content
Sign in to follow this  
Mattraks

Delete

Recommended Posts

Mattraks

Delete

Edited by Mattraks

Share this post


Link to post
Share on other sites
Swift

$var = Random(1, 5)

Msgbox(0, "", $var)

Will display a random number between 1 and 5

In conclusion

Random($lownumber, $highnumber, $put 1 if you want a interger)

Edited by Swift

Share this post


Link to post
Share on other sites
SmOke_N

Ok, so im making a game with auto it and i want it to be where if you click a button, then it will randomly pick a number, say 1-5 and yea. If it is possible to do that, can someone show me how? Thanks in advance.

case $button

msgbox(64, "info", Random(1, 5, 1))


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
SmOke_N

Thanks.

To the person above Smoke, that one just does it with a decimal and i kinda don't know how to use a decimal in it. But thanks anyways.

What are you talking about:
msgbox(64, "info", Random(1, 5, 1))
No decimal there.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Swift

He was talking about my post Smoke_N! :)

Share this post


Link to post
Share on other sites
SmOke_N

He was talking about my post Smoke_N! ;)

Ahh, I see :)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.