Sign in to follow this  
Followers 0
Arez

If Has No Matching Endif Statement Help!

12 posts in this topic

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!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Edit...:

TG2345 fixed his!

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

#6 ·  Posted (edited)

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

OOOOOOOOOMY

GOD

HEEEEEEEEEEEEEEEEEEEEEEEELP!!!!1111

Edited by Arez

Share this post


Link to post
Share on other sites

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!

[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

DUDE

I FIGURED IT OUT BY MYSELF

BECAUSE YOU SAID THAT

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

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

[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

haha, this guy is killing me.


[size=20]My File Upload[/size]Register at my site and upload.

Share this post


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

Share this post


Link to post
Share on other sites

yes, my post was useless, but the problem IS solved, therefore a single comment should be allowed.


[size=20]My File Upload[/size]Register at my site and upload.

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