Sign in to follow this  
Followers 0
Irrelixier

Generate Numbers

6 posts in this topic

#1 ·  Posted (edited)

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 this post


Link to post
Share on other sites



#2 ·  Posted (edited)

$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

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

^

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 this post


Link to post
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 this post


Link to post
Share on other sites

#6 ·  Posted (edited)

What about this.

$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

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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  
Followers 0