Jump to content
Sign in to follow this  
AzKay

Optimize this?

Recommended Posts

Opt("MouseCoordMode", 2)
Opt("PixelCoordMode", 2)
Opt("MouseClickDragDelay", 1)
Opt("MouseClickDownDelay", 1)
Opt("MouseClickDelay", 1)
Global $Beef

HotKeySet("{F2}", "_Start")
HotKeySet("{F3}", "_Click")
HotKeySet("{F4}", "_Stop")

While 1
    Sleep(100)
WEnd

Func _Start()
    $Beef = 0
    Do
    $PixelSearch = PixelSearch(455, 127, 768, 481, 0xFFFFFF, 254, 1)
    If IsArray($PixelSearch) Then
        MouseClickDrag("Left", $PixelSearch[0] +1, $PixelSearch[1] +1, 230, 266, 1)
    EndIf
    Until $Beef = 1
EndFunc

Func _Click()
    $Beef = 0
    Do
    $r = Random(10, 25, 1)
    MouseClick("Left", 230 +$r, 266, 1, 1)
    $r = Random(10, 25, 1)
    MouseClick("Left", 230 -$r, 266, 1, 1)
    $r = Random(10, 25, 1)
    MouseClick("Left", 230, 266 +$r, 1, 1)
    $r = Random(10, 25, 1)
    MouseClick("Left", 230, 266 -$r, 1, 1)
    Until $Beef = 1
EndFunc

Func _Stop()
    $Beef = 1
EndFunc

I was wondering, if it was possible to optimize the MouseClickDrag on this. Its too slow.

EDIT::

This is why I posted this thread, http://www.autoitscript.com/forum/index.php?showtopic=35319

To have a faster pixelsearch/mousedrag. But, Its just too confusing.

Edited by AzKay

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

MouseClickDrag("Left", $PixelSearch[0] +1, $PixelSearch[1] +1, 230, 266, 1)

I was wondering, if it was possible to optimize the MouseClickDrag on this. Its too slow.

I dunno if setting the speed parameter to '0' will for for you, but it makes it faster...

Share this post


Link to post
Share on other sites

Ive tryed that, Didnt work.

if your goal is to do as quickly as possible it looks like copy-paste or move

take a look at the topic for a winmove which is too quick

Would it be a solution?

Share this post


Link to post
Share on other sites

if your goal is to do as quickly as possible it looks like copy-paste or move

take a look at the topic for a winmove which is too quick

Would it be a solution?

No, Its for a puzzle, Its supposed to search for each piece on the right, and drag them over to a pile on the left side.

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

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  

×
×
  • Create New...