Sign in to follow this  
Followers 0
lilandywandy

Mouse Click .....?

9 posts in this topic

i use mouse click left coord and once 2 times on 2 different places, but its so slow even with no sleep... is there anyway to make it faster?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

make your speed 0 on the click.

MouseClick ( "button" [, x, y [, clicks [, speed ]]] )

Sometimes it is faster to just do

MouseMove($x,$y,0)
mouseclick("left")

note:

there are also options for how long to hold button down and such in the help file if your application misses the clicks.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

srry can u write me an example, ive never used coding with []

like what i really mean is when the mouse moves, near the end it slows down before reaching the coords, is there anyway i can make it like move directly to the coord without slowing down>?

Edited by lilandywandy

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

for $i=10 to 0 step -1
   tooltip("speed=" & $i,0,0)
   mousemove(10,10,$i)
   mousemove(600,600,$i)
Next
msgbox(1,"ready?","going to do it 10 more times really fast")
sleep(1000)
for $i=1 to 10
   mousemove(10,10,0)
   mousemove(600,600,0)
Next
msgbox(1,"that was quick eh?","")

use

MouseClick("left", 10, 10, 1, 0)

MouseClick(button, x, y, how many times, speed{0 is instant, 1 fast, 2 slower, etc} )

ok, now to show clicks.

for $i=10 to 0 step -1
   tooltip("speed=" & $i,0,0)
   MouseClick("left", 10, 10, 1, $i)
   MouseClick("left", 600, 600, 1, $i)
Next
msgbox(1,"ready?","going to do it 10 more times really fast")
sleep(1000)
for $i=1 to 10
   MouseClick("left", 10, 10, 1, 0)
   MouseClick("left", 600, 600, 1, 0)
Next
msgbox(1,"that was quick eh?","")
Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

wow im lost....

HotKeySet("{PAUSE}", "mExit")

MouseClick("left", 568, 23, 1)

While 1

If PixelGetColor(120,777) = Dec("7b7984") Then

Send("{F11}")

Sleep(500)

Send("{F1}")

Sleep(7000)

Send("{F2}")

Sleep(200)

Send("{F1}")

Sleep(4000)

Send("{F9}")

Sleep(4000)

MouseClick("left", 544, 405, 1)

Sleep(1000)

MouseClick("left", 544, 405, 1)

MouseClick("left", 730, 499, 1)

EndIf

Wend

Func mExit()

Exit

EndFunc

how do i make MouseClick("left", 544, 405, 1)

MouseClick("left", 730, 499, 1)

click faster?

Share this post


Link to post
Share on other sites

Dec("7b7984") Then   

Hmmm, is that Dec or 0x Hex? Just curious....


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Hex... 0-9, A-F. I think it would be a little bit quicker to do this but...

If PixelGetColor(120,777) = 8092036 Then; Same as Dec("7b7984")
Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

how do i make

MouseClick("left", 544, 405, 1)

MouseClick("left", 730, 499, 1)

click faster?

<{POST_SNAPBACK}>

You need to add the speed parameter to each of those lines.

MouseClick("left", 544, 405, 1) <<<your code

MouseClick("left", 544, 405, 1, 0) <<< new code

MouseClick("left", 730, 499, 1) <<<your code

MouseClick("left", 730, 499, 1, 0) <<< new code


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

Share this post


Link to post
Share on other sites

Yup herewasplato,

how do i make
MouseClick("left", 544, 405, 1)
MouseClick("left", 730, 499, 1)
click faster?

MouseClick

--------------------------------------------------------------------------------

Perform a mouse click operation.

MouseClick ( "button" [, x, y [, clicks [, speed ]]] )

Parameters

button The button to click: "left", "right", "middle", "main", "menu", "primary", "secondary".

x, y [optional] The x/y coordinates to move the mouse to. If no x and y coords are given, the current position is used.

clicks [optional] The number of times to click the mouse. Default is 1.

speed [optional] the speed to move the mouse in the range 1 (fastest) to 100 (slowest). A speed of 0 will move the mouse instantly. Default speed is 10.

thus:

MouseClick("left", 730, 499, 1); = speed of 10

MouseClick("left", 730, 499, 1,0); = speed of instant

MouseClick("left", 730, 499, 1,1); = speed of 1

Think speed as delay, delay of 0 is instant, delay of 1 is fast, delay of 10 is ...

If you leave off the delay, it defaults to 10.


AutoIt3, the MACGYVER Pocket Knife for computers.

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