Jump to content

Simple Question, but newbie


Garicup
 Share

Recommended Posts

Hi, I'm new to the forums but not completely new to Autoit. I've never really done anything complicated with Autoit, so my question might have an extremely trivial solution.

Im writing a script, I want it to randomly click spots within a defined area

example: I have a box on the screen, say (200, 210, 300, 310) [x,y(top left), x,y(bottom right)] and I want it to repeatedly click in between that box at random spot using the Mouseclick function or other clicking functions. How would I do this?

((I want it to say: Click "239, 284" then 256, 301....and so on and so forth....inside a given area at random...))

or easily put, I want random clicking, but controlled as to where the randomness extends to

I know the example isn't aimed at a specific situation but hopefully the idea of what I'm trying to do passes through. I just want to know if it can be done and how, I don't want it specifically done for my project.

Any help is appreciated, Thanks

Link to comment
Share on other sites

Try this -

$x = random(239, 256)
$y = random(121, 150)
$speed = Random(1, 4);so the movement of the mouse is at random speed too
Mouseclick($x, $y, 1, $speed)

Also, look in the example script section for AutoIt 1 2 3. It is a sticky. It will teach you the basics.

Edited by Volly
Link to comment
Share on other sites

I had similar problem in identifying text on image/picture on active windows such as webpage on realtime.

Hope this post could discuss more further... :)

[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]
Link to comment
Share on other sites

I had similar problem in identifying text on image/picture on active windows such as webpage on realtime.

Hope this post could discuss more further... :)

I mean, I can select click the picture without saving first the image(like other post using OCR script).

[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]
Link to comment
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
 Share

  • Recently Browsing   0 members

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