Sign in to follow this  
Followers 0
Aklentys

Auto Clic Moving Object

4 posts in this topic

Hi,

Im interested to get a script that make the arrow clic on a moving item on my screen

Anyone got a basic script? Find a moving target and clic on it

Thanks for help :D

Share this post


Link to post
Share on other sites



Hi,

Im interested to get a script that make the arrow clic on a moving item on my screen

Anyone got a basic script? Find a moving target and clic on it

Thanks for help :D

Try searching for Pixelsearch in the help file.

Goodluck

~~

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I tried this

Opt("WinWaitDelay",100)

Opt("WinTitleMatchMode",4)

Opt("WinDetectHiddenText",1)

Opt("MouseCoordMode",0)

Dim $Coord, $Click, $Target, $SearchResult

$Target = 0x7B7D4A

$Click = "Right"

While 1

$SearchResult = PixelSearch(360,49,1005,337,0x7B7D4A,1);

If @error Then

Else

MouseClick($Click, $SearchResult, $SearchResult)

Send("{F3}") ; This is the skill to be used on the enemy.

Sleep(10000)

EndIf

WEnd

Doesnt work at Mouseclick :/ The mouse goes at 0,0 and clic here -.-

Edited by Aklentys

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

i've been trying to get a script working for almost the same reason.. im just stuck on telling my script that the target pixel moves when the mouse moves.. but if you're looking for something basic this is what you can use

HotKeySet("{F1}", "_Exit")
HotKeySet("{F5}", "Start")
HotKeySet("{F6}", "Stop")

Global $ON = False
Global $color = 0x960000

Opt("MouseCoordMode", 1)
Opt("PixelCoordMode", 1)
Opt("MouseClickDelay", 0)
Opt("MouseClickDownDelay", 0)

While 1
    Sleep(10)
    If $ON = True Then
        $coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, $color, 1, 2)
        If IsArray($coord) = 1 Then
            MouseClick( $coord[0], $coord[1], 1, 0)
            Sleep(10)
        EndIf
    EndIf
WEnd

Func _Exit()
    Exit
EndFunc
Func Start()
    $ON = True
EndFunc
Func Stop()
    $ON = False
EndFunc

of course you change $color to whatever you want it to be

Edited by demandnothing

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