Sign in to follow this  
Followers 0
helpmepls

help me out pls xD

8 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



the error is:

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

when i press ctrl +t it just move the scripts up or down so what script should i move?

Share this post


Link to post
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


If I post a code or snippet, please tell me what I did wrong and/or what I can do better. Tell me my code/idea sucks, if it does. If I ask for help, refrain from only telling me to search the help file and/or the forums. I will search before asking, I just may not have searched with good keywords. If I say that I will look into something or fix something later, understand that I am most likely lying.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

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

[center]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.[/center]

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