Jump to content

Recommended Posts

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
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
Posted

@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.

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.

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
  • Recently Browsing   0 members

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