# Calculated random sleep =0

## Recommended Posts

Now I cant go 1 day without posting some kind of question. So here is the question of the day:

Is this possible?

And where would i find the info on it?

```\$t1 = InputBox("Test", "How many minutes would you like to sleep??", "")

\$t2 = \$t1 * 600000
\$t3 = \$t2 + 200000

sleep(random(\$t2,\$t3))
msgbox(0, "test", "This is a test")```

This is a little something i was working on with my son, and we are testing to see if it is possible to generate an input box and tie it to a random sleep command.

Thanks for any replies.

Cue ( the tinker ) adding the s is optional

##### Share on other sites

Im not quite sure i understand your question.

However..

```\$t2 = \$t1 * 600000 ; take off one Zero. its not Six Hundred Thousand. Its Sixty  Throusand, 60,000 = 1 min.
\$t3 = \$t2 + 200000```

But your code should work fine.

Edited by Steveiwonder

They call me MrRegExpMan

##### Share on other sites

Not sure about your maths but Im crap at it, should it be *60000 ?

Monkey's are, like, natures humans.

##### Share on other sites

HAHA i can be so sometimes.

Yup was sitting here waiting for a 60 sec test, only it was set for 60 min =\

Thanks.

And sorry for filling up the forum with a dumb math question

lol

Cue

## Create an account

Register a new account

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
×
• Create New...