Sign in to follow this  
Followers 0
Noobcube

mouseclick/coordinates

11 posts in this topic

Hi,

I would like to make a scripts on a loop what will start at with a mouseclick at say the co-ords 100,100 and everytime it repeats the x and y will decrease by 10. Is that possible or will i have to type them all out?

Share this post


Link to post
Share on other sites



Of course it is possible ... and you have to type it yourself (that's how scripts are created).

All you need is MouseClick, For/Next and Sleep, all of them could be found in the help file or in the online documentation http://www.autoitscript.com/autoit3/docs/

It is a basic script so I guess you will enjoy making it :D


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

for $i=100 to 0 Step -10
ToolTip($i)
sleep(100)
Next

Share this post


Link to post
Share on other sites

for $i=100 to 0 Step -10
ToolTip($i)
sleep(100)
Next

Ok so far i have this

sleep(5000)
For $x = 441 to 1206 Step +51
For $y = 275 to 575 Step +20
    Mouseclick("Left", $x, $y, 1, 5)
Next
MsgBox(0,"", "Ok")
Next
MsgBox(0,"", "Ok")

but it goes 441x275 to 575, then 492x275 to 575.

How come its not going 441x275, then 492x295 etc

Share this post


Link to post
Share on other sites

That's how For/Next is working:

For $i = 1 To 3
    For $j = 1 To 3
        MsgBox(0, "$i and $j values", "$i = "&$i&", $j = "&$j, 1)       
    Next
Next

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

you can try like this

Dim $x = 441,$y = 275
For $b = 0 to 15 Step 1
    ToolTip($x+(51*$b)&" "&$y+(20*$b))
    Sleep(100)
Next
Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Hehe. I like BogQ's way better....but here is mine.....my posts keep getting beat today :D

$y=275
for $x=441 to 1206 Step 51
    ToolTip($x&", "&$y)
    $y=$y+20
    sleep(100)
Next

Share this post


Link to post
Share on other sites

you can try like this

Dim $x = 441,$y = 275
For $b = 0 to 15 Step 1
    ToolTip($x+(51*$b)&" "&$y+(20*$b))
    Sleep(100)
Next

that works thanks :D

the 51 and 20 are wrong( my fault) but its working, thanks alot :huggles:

Share this post


Link to post
Share on other sites

that works thanks :D

the 51 and 20 are wrong( my fault) but its working, thanks alot :huggles:

Is there a way where $b doesnt increase? Thats whats knocking my numbers out

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

don't understand you, explain pls.

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

don't understand you, explain pls.

The mouse has to move by 51 and 20 everytime, but its being times by b,so it will move by, 1st=0, 2nd=51, 3rd=102 etc

EDIT: Nevermind, i just looked over the script and noticed what it does, DUH! Sorry for the confusion ^^

Edited by Noobcube

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