Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 06:32

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Mouseclick or Mousemove+Mousedown?

Discussion on Mouseclick or Mousemove+Mousedown? within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
fuso98's Avatar
 
elite*gold: 428
Join Date: Dec 2011
Posts: 2,722
Received Thanks: 2,037
Mouseclick or Mousemove+Mousedown?

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.
fuso98 is offline  
Old 12/15/2013, 12:32   #2
 
elite*gold: 0
Join Date: Dec 2013
Posts: 26
Received Thanks: 3
afaik mouseclick is better, mm+md doesnt seem to get recognized every time.
~StackUp~ is offline  
Old 12/15/2013, 13:17   #3
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
MouseClick with coordinates is better because it shortens the code an the difference is not big.
alpines is offline  
Old 12/15/2013, 21:09   #4
 
fuso98's Avatar
 
elite*gold: 428
Join Date: Dec 2011
Posts: 2,722
Received Thanks: 2,037
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
fuso98 is offline  
Old 12/15/2013, 21:53   #5
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
It's up to you what to do. I wouldn't care if its just 100-105ms.
alpines is offline  
Old 12/15/2013, 22:04   #6
 
YatoDev's Avatar
 
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
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

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)
YatoDev is offline  
Thanks
1 User
Old 12/15/2013, 22:25   #7
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
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.
alpines is offline  
Thanks
1 User
Old 12/15/2013, 23:24   #8
 
butter123's Avatar
 
elite*gold: 95
Join Date: May 2011
Posts: 982
Received Thanks: 189

with
MouseClickDelay and MouseClickDownDelay
butter123 is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Mousemove & Mouseclick
11/10/2013 - AutoIt - 6 Replies
Hallo, wollte gerade nen Bot schreiben, wo Grüne Tiere da rumlaufen, alles geklappt bis zum Mousemove, der geht auch mit der Maus auf das grüne Tier, bloß wie kombiniere ich das mit einen Klick. Wie baue ich eine Startfunktion + Pausefunktion ein? HotKeySet("{F6}","_Exit") while 1 $variable = pixelsearch(37,123,1356,751,Farbe wird öfters (selber) definiert)
pixelSearch; mouseMove while mouseDown
06/23/2013 - AutoIt - 3 Replies
hei, i want to know how to create a script, that detects a specific colour, which the mouse follows, WHILE holding "rightclick" UNTIL the specific colour disappears. Lets say your mouse detects a red square, follows it, while holding "rightclick" down. then after a while the square disappears and the mouse stops holding "rightclick". greetings.
Mousedown/Mouseup
03/10/2013 - AutoIt - 5 Replies
Hallo epvp, und zwar möchte ich ein Programm schreiben, welches so eine Funktion benötigt if mousedown then alle_100_ms_linke_maustaste_drücken until mouseup Jedoch ist mir bei Autoit keine Abfrage bekannt die überprüfen kann ob die linke maustaste unten oder oben ist. Deshalb ist meine Frage ob jemand so eine Funktion kennt oder eine andere Methode mit der sowas realisierbar ist.
in Oblivion MouseMove()/MouseClick() doesnt work
05/29/2010 - AutoIt - 10 Replies
as the title says it MouseMove and MouseClick functions dont work for the game i need it (The Elder Scrolls 4: Oblivion) actually MouseClick does work, but only if i dont use coordinates i.e. MouseClick("left") my guess is that the mouseclick funktion in autoit is moving the mouse by calling MouseMove() so i'd really just need to find another way to move the mouse MouseMove() as well as mouseclick("left",x,y) makes the mouse jump to one of the 4 corners of the game window (same problem...



All times are GMT +2. The time now is 06:32.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.