Jump to content

help me out pls xD


Recommended Posts

ok i want to make a program that click in the top middle of the screen now everytime i try to start it i get error here are the scripts but i need it to be repeating it the time that i put it, when i put it like that i get error in func check HP

HotKeySet("{F11}", "Pause")

Global $Paused

While 1

WinWaitActive("SRO_Client")

Sleep(200)

CheckZerk()

CheckHP()

CheckMP()

CheckDC()

SendSkill()

MouseClick()

WEnd

Func CheckZerk()

If PixelGetColor(14, 22) <> (0) Then

Send("{TAB}")

EndIf

EndFunc ;==>CheckZerk

Func MouseClick()

MouseClick ("Left",500,0,5)

Sleep(15000)

MouseClick ("Left",500,0,5)

Sleep(15000)

MouseClick ("Left",500,0,5)

Sleep(15000)

MouseClick ("Left",500,0,5)

Sleep(15000)

MouseClick ("Left",500,0,5)

Sleep(15000)

MouseClick ("Left",500,0,5)

Sleep(15000)

Func CheckHP()

If PixelGetColor(703, 743) <> (0) Then

Else

EndIf

EndFunc ;==>CheckHP

Func CheckMP()

If PixelGetColor(667, 743) <> (0) Then

EndIf

EndFunc ;==>CheckMP

Func CheckDC()

If PixelGetColor(528, 425) = (16710616) Then

MouseClick("left", 512, 422, 1, 0)

EndIf

EndFunc ;==>CheckDC

Func SendSkill()

While PixelGetColor(429, 46) = (16724273) and PixelGetColor(411, 20) <> (16248774)

ControlSend("SRO_Client", "", "", "{F1}")

ControlSend("SRO_Client", "", "", "1")

Sleep(2000)

ControlSend("SRO_Client", "", "", "2")

Sleep(2000)

ControlSend("SRO_Client", "", "", "3")

Sleep(2000)

ControlSend("SRO_Client", "", "", "4")

Sleep(2000)

ControlSend("SRO_Client", "", "", "5")

Sleep(2000)

ControlSend("SRO_Client", "", "", "6")

Sleep(2000)

Wend

EndFunc ;==>SendSkill

Func Pause()

$Paused = Not $Paused

While $Paused

Sleep(400)

WEnd

EndFunc ;==>Pause

Edited by helpmepls
Link to comment
Share on other sites

the error is:

Error:"Func" statement has no matching "EndFunc"

:D Wonder what that can be :)

You know, structuring your script is important. Use Tidy as @xcal sugested.

Also, it would help a lot of you wrap your code with the autoit tags. Use the A button at the midle of the editor (The blue one)..:P

Where is ;==>MouseClick ??? :D

Link to comment
Share on other sites

This is the most ridiculous request ever. You're having the forum tidy your script... when it's spelled out in front of you!?!

Error:"Func" statement has no matching "EndFunc"

Look for a "Func" statement that has no matching "EndFunc"!! what more is there....?

Func MouseClick has no matching EndFunc

Put one in

Link to comment
Share on other sites

  • Moderators

This is the most ridiculous request ever. You're having the forum tidy your script... when it's spelled out in front of you!?!

Error:"Func" statement has no matching "EndFunc"

Look for a "Func" statement that has no matching "EndFunc"!! what more is there....?

Func MouseClick has no matching EndFunc

Put one in

I'll agree with most of what you typed... but the suggestion you posted is not entirely true.

Func with No EndFunc... Doesn't always mean there is a function without an EndFunc... What it could be is...

From:

Func

.

.

.

.

>> EndFunc

there could be an If missing an EndIf ... a For missing a Next ... a Switch missing an EndSwitch ... a While missing a WEnd ... a Do missing an Until ... a Select missing an EndSelect and anything else I may have left out.

Edit:

The error is kind of a stupid one though... The actual error is caused by:

Func MouseClick()
Which actually has no EndFunc as everyone suggested, but you can't create a function name that is already a Standard Function. Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...