Jump to content

If Has No Matching Endif Statement Help!


Arez
 Share

Recommended Posts

This code doesn't work:

If WinExists ("Diablo II") Then
WinActivate ("Diablo II")
WinWaitActive ("Diablo II")
$WinPos = WinGetPos ("Diablo II")

HotKeySet("{NumPadAdd}","getpos")
HotKeySet("{END}","quitme")

While 1
    sleep(10)
WEnd

While 1
MouseClick("left", 415, 404, 1, 2.5)
Sleep(0)
Send("1")
Sleep(0)
Send("{ENTER}")
Sleep(0)
WEnd

EndFunc

func quitme()
exit
EndFunc

Func Close()

Help!

Link to comment
Share on other sites

um cuz u have a sleep in there and its not gettin to the other stuff and just a func close with out any thing AND WTF UR SLEEPING 0? WHATS THE POINT OF HAVING IT

If WinExists ("Diablo II") Then
WinActivate ("Diablo II")
WinWaitActive ("Diablo II")
$WinPos = WinGetPos ("Diablo II")

HotKeySet("{NumPadAdd}","getpos")
HotKeySet("{END}","quitme")


While 1
MouseClick("left", 415, 404, 1, 2.5)
Sleep(100)
Send("1")
Sleep(100)
Send("{ENTER}")
Sleep(100)
WEnd


func quitme()
exit
EndFunc

func getpos()
    $WinPos = WinGetPos ("Diablo II")
    Msgbox(0,"Diablo II", "Diablo II is currently at :" & $WinPos)
EndFunc
Edited by thatsgreat2345
Link to comment
Share on other sites

HAAHHAH my bad didnt delete on of ur endfuncs that u randomly threw in there

If WinExists ("Diablo II") Then
WinActivate ("Diablo II")
WinWaitActive ("Diablo II")
HotKeySet("{NumPadAdd}","getpos")
HotKeySet("{END}","quitme")
While 1
MouseClick("left", 415, 404, 1, 2.5)
Sleep(100)
Send("1")
Sleep(100)
Send("{ENTER}")
Sleep(100)
WEnd
func quitme()
exit
EndFunc
func getpos()
    $WinPos = WinGetPos ("Diablo II")
    Msgbox(0,"Diablo II", "Diablo II is currently at :" & $WinPos)
EndFunc
Edited by thatsgreat2345
Link to comment
Share on other sites

  • Moderators

Now it says Func statement has no matching EndFunc. O my god heeeeeeeeelp!!!!!

Edit...:

TG2345 fixed his!

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

  • Moderators

Now it's saying: if has no matching endif statement!

OOOOOOOOOMY

GOD

HEEEEEEEEEEEEEEEEEEEEEEEELP!!!!1111

Do you see the If something Then... Find out where you want to stop creating an action for that and put an EndIf!

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

  • Moderators

DUDE

I FIGURED IT OUT BY MYSELF

BECAUSE YOU SAID THAT

That's the fun part about coding IMO :think:

Edit:

Good Job BTW!

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

haha, this guy is killing me.

i cant believe im replying makes me even more noobish but was this post seriously required? im seriously unless he's is like seriously killing you then i will call 911 but if not then that was a completely pointless post.

but yes good job for figuring it out i had that in a post but i deleted it cuz smoke beat me :think:

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