Sign in to follow this  
Followers 0
pezo89

mouseclick within an square? (help requested)

7 posts in this topic

#1 ·  Posted (edited)

Hey guys, just wondering if somone could help me with this little issue of mine,

is it possible to do mouseclicks along a square?, for example 0,0,1024,768

with a spread of 10pixels?,

so it clicks 10,10 then 20,20 then 30,30 it is for a webbased game, tried Pixelsearch, however it tends to fail, as there is more than 2 of ea color on ea item, and it is not always registered when it clicks there =(

update: and i also know that i could do like 100 mouseclick @ each wanted position, but i kinda want to know if there is an easier way =)

Edited by pezo89

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You could do something like this:

$coords = 10

While $coords < 768
    MouseClick("left", $coords, $coords)
    $coords += 10
WEnd

An easier way to do what? More information please.

Edited by Hawkwing

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Share this post


Link to post
Share on other sites

You could do something like this:

$coords = 10

While $coords < 768
    MouseClick("left", $coords, $coords)
    $coords += 10
WEnd

An easier way to do what? More information please.

well thats somthing i'm looking for, but where do u type in max X line? 768 is the Y, but i cannot see an end to the X

Share this post


Link to post
Share on other sites

Well, the resolution isn't a perfect square, so do you want it to click at 768,778;768,788;etc along the edge of the screen?


The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Well, the resolution isn't a perfect square, so do you want it to click at 768,778;768,788;etc along the edge of the screen?

well, i want it to click inside a large square, with 5-10 px'es inbetween (that i can sort out myself, aswell as with the total size)

but for example,

A----------------B

C|--------------|D

|--------------|

|______________|

i want it to click first in lines from A-B then C-D and so on

now that above was supposed to be a box, but that did't turn out so well >_>

Edited by pezo89

Share this post


Link to post
Share on other sites

So, if I understand now, you don't want it to click diagonally, but start at the bottom of the screen, click from left to right every 10 pixels, then go up 10 pixels and repeat, right?


The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Share this post


Link to post
Share on other sites

Opt("MouseClickDelay", 1) ; adjust as needed
; Alters the length of the brief pause in between mouse clicks.
; Time in milliseconds to pause (default=10).

Opt("MouseClickDownDelay", 1) ; adjust as needed
; Alters the length a click is held down before release.
; Time in milliseconds to pause (default=10).

HotKeySet("{ESC}", "Terminate")


For $y = 0 To 768 Step 10
    For $x = 0 To 1024 Step 10
        MouseClick("left", $x, $y, 1, 0)
        ;MouseMove($x, $y, 5)
    Next
Next

Func Terminate()
    Exit
EndFunc   ;==>Terminate


[size="1"][font="Arial"].[u].[/u][/font][/size]

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