when i receive Login Failed. i can't get it to reconnect.
That sucks.
After the login error line, (probably addchat/addtext)
put in the following, while subsituting the name of your winsock
Winsock1.Close
not too hard :P
to reconnect, just put the following while subsituting the name of your button/menu name.
Winsock1.close
Connect_click
im not an idiot like that lurker
i don't know how to parse it out and to tell it to reconnect
I tried
if txtchat = "Login Failed" Then
wins.close
wins.connect
end if
also alot of other things
Quotewhen i receive Login Failed. i can't get it to reconnect.,
you werent specific, no where in that did you say anything about parsing
sry, i dont know much about parsing, learning though
Quotetest1test2
test3
test4
Quotei don't know how to parse it out
You don't know how to parse which out? The term of "parsing it" is quite broad.
if txtchat = "Login Failed" Then
wins.close
wins.connect
end if
Where is this code?
that should be in txtchat_change (what kane said)
Quotewhat kain said
My name is spelled "Kane", thank you very much.
It makes more sense to do a reconnect in the disconnected event handler, not in the text changed event.
By the way, if it *is* in the text changed event, and txtchat is all of the text of the chat field, then you need to modify the checking code, so that it checks the last message added to the text, instead of checking the whole text (which means, it would only return true of the ONLY message is the last message).
If Mid(txtchat,Len(txtchat)-Len("Login Failed")) = "Login Failed" Then
Though, that code is quite inefficient.
You're using a winsock control so why don't you put this on your winsock_close event. Maybe you can have a disconnect bool and check if the disconnect was deliberate or not.