# Generate Numbers

## Recommended Posts

Hi all,

I'm pretty new to AutoIT to be honest, and am still wondering to make my program to work.

I was wondering to make a script that makes a mouse to moves inclining (to the right) without going declining (to the left)

I created this

```Do
\$x = random(311,424) ;;obviously here to pick the value 311~424
\$y = 320
mousemove (\$x, \$y,50)
\$i +=1
Until \$i = 15 ;;repeat 15x```

What I want is that the value randomly goes up without going down, is such thing possible using the random function or do I need to change anything else?

Since my aim is to make the mouse move to the right, then to the left later on

Edited by Irrelixier

##### Share on other sites

```\$i = 0
\$x = 311
Do
\$x = Random(\$x, 424) ;;obviously here to pick the value 311~424
\$y = 320
MouseMove(\$x, \$y, 50)
\$i += 1
Until \$i = 15 ;;repeat 15x```

Edited by JohnOne

Monkey's are, like, natures humans.

##### Share on other sites

^

yeah i placed that its not the "error" that i was wondering im wanting to make a graph and using the scale like this

what i was wanting is a mouse movement on the scale to create something close like that graph,

first inclining, then declining.

Edited by Irrelixier

##### Share on other sites

Oh, because I thought you said this

"What I want is that the value randomly goes up without going down,"

Monkey's are, like, natures humans.

##### Share on other sites

@John

Yea it worked, but looks weird lol. Since its a research to determine the randomness of judge assessing the sample against a computer

I absolutely have no programming lesson in my life and had to do this programming randomisation thing.

##### Share on other sites

```\$i = 0
\$x = 0
\$y = 420
\$maxheight = \$y - 200
Do

MouseMove(\$x, \$y, 10)
\$x = Random(\$x, \$x + 50,1)
\$y = \$y - Random(0, 10,1)
\$i += 1
Until \$y <= \$maxheight

Do

MouseMove(\$x, \$y, 10)
\$x = Random(\$x, \$x + 50,1)
\$y = \$y + Random(0, 10,1)
\$i += 1
Until \$y >= 420```
Edited by JohnOne

Monkey's are, like, natures humans.

## Create an account

Register a new account

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...