# Making Random Numbers

## Recommended Posts

Help will be really appreciated, i want to generate random numbers like between 0.800 and 0.900, and then send the generated number to be written like in notepad.

I really don't know how to do this.

Send(Random([0.510[, 0.590]])

Edited by Nitto

##### Share on other sites

`Send(Random(0.800, 0.900))`

##### Share on other sites

`Send(Random(0.800, 0.900))`
Wow thx also is there any way to limit the decimals to just 3 lik 0.8XX

##### Share on other sites

Because the Random function returns something like 15 places after the decimal, you might want to do it a little differently. Like by asking for a random between 800 and 900 then dividing by 1000

```\$var = Random(800,900,1) / 1000 ; the last item in the ran function ensures that an intiger is returned
MsgBox(4096,"", \$var)```

##### Share on other sites

...or you can do it like this:

`Send(StringLeft(Random(0.800, 0.900), 5))`

##### Share on other sites

look at round()

MsgBox(0,"",Round(Random(0.800, 0.900),3) ) ;limit to 3 digits

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

##### Share on other sites

Thaknk's to both now i have random numbers

## Create an account

Register a new account