Mouseclick or Mousemove+Mousedown?

12/15/2013 12:29 fuso98#1
I've a question, i've downloaded an UDF for fast mouse click, But i want a faster mouseclick. So my question is: is better do only a Mouseclick or do a Mousemove and then MouseDown("left") ?
I've done test with timers, but sometimes is better mouseclick and sometimes mousemove+down.
12/15/2013 12:32 ~StackUp~#2
afaik mouseclick is better, mm+md doesnt seem to get recognized every time.
12/15/2013 13:17 alpines#3
MouseClick with coordinates is better because it shortens the code an the difference is not big.
12/15/2013 21:09 fuso98#4
Quote:
Originally Posted by alpines View Post
MouseClick with coordinates is better because it shortens the code an the difference is not big.
Some times with timers the difference was of 100-105 ms O.o
12/15/2013 21:53 alpines#5
It's up to you what to do. I wouldn't care if its just 100-105ms.
12/15/2013 22:04 YatoDev#6
Quote:
Originally Posted by alpines View Post
It's up to you what to do. I wouldn't care if its just 100-105ms.
100 ms are deadly in that what he does :p

Fuso:
Create a script with some ways of code implementation and let it run all tests 100 times in a do.. until (with timers). Then calculate the average of each way and see whats the best

and do some code optimizing in your bot.
Mayby you can do something like :
Code:
$i+=1
and short all code and variables
(But i thing your obfuscator will destroy your fast code)
12/15/2013 22:25 alpines#7
Code:
Local $iTime = 0

For $i = 0 To 150
	$tmr = TimerInit()
	MouseMove(500, 500, 0)
	MouseClick("left")
	$iTime += TimerDiff($tmr)
	MouseMove(800, 800, 0)
Next

ConsoleWrite("MouseMove + MouseClick result: " & $iTime / 150 & "ms" & @CRLF)

$iTime = 0

For $i = 0 To 150
	$tmr = TimerInit()
	MouseClick("left", 500, 500, 1, 0)
	$iTime += TimerDiff($tmr)
	MouseMove(800, 80, 0)
Next

ConsoleWrite("MouseClick only result: " & $iTime / 150 & "ms" & @CRLF)
The result:
Code:
MouseMove + MouseClick result: 20.2364931484904ms
MouseClick only result: 30.3174739185217ms
I would use MouseClick only because it makes the code smaller although its just ~10ms slower.
12/15/2013 23:24 butter123#8
[Only registered and activated users can see links. Click Here To Register...]
with
MouseClickDelay and MouseClickDownDelay