Jump to content

pls help me solve the problem


Recommended Posts

hi i a new user of autoit.

i receive an error msg on line 26 about targeting a monster using a mouse right click.

#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.0.0

Author: myName

Script Function:

Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

Opt("WinWaitDelay",100)

Opt("WinTitleMatchMode",4)

Opt("WinDetectHiddenText",1)

Opt("MouseCoordMode",0)

WinWait("LastChaos - Aeria Games & Entertainment (Window 800x600)","")

If Not WinActive("LastChaos - Aeria Games & Entertainment (Window 800x600)","")

Then WinActivate("LastChaos - Aeria Games & Entertainment (Window 800x600)","")

WinWaitActive("LastChaos - Aeria Games & Entertainment (Window WinWaitActive("LastChaos - Aeria Games & Entertainment (Window WinWaitActive("LastChaos - Aeria Games & Entertainment (Window 1024x768)","")

HotKeySet('{esc}', '_Exit')

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

$Target = 0x653813

$"Click = "Right <-------receive an error msg

While 1 = 1

Sleep(100)

$SearchResult = PixelSearch(252,196,768,487,$Target,5,3)

If @error Then

Else

MouseClick($Click, $SearchResult[0]+25, $SearchResult[1]+35, 7, 3)

If $SearchResult = PixelSearch(237,193,806,638,$Target,5,1) Then

Send("{F1}")

Send("{F3}")

Else

Send("{Right}")

$SearchResult = PixelSearch(342,342,1000,342,$Target,5,3)

MouseClick($Click, $SearchResult[0]+25, $SearchResult[1]+35, 7, 3)

if $SearchResult = PixelSearch(237,193,806,638,$Target,5,1) Then

Send("{F1}")

Send("{F3}")

EndIf

EndIf

EndIf

WEnd

Func _Exit()

Exit

EndFunc

While 1

Sleep(5*60*1000)

Send("{F3}")

WEnd

TYVM

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...