Jump to content

Delete


Recommended Posts

$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
Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...