• Welcome to Valhalla Legends Archive.
 

vb bot help

Started by haro, March 07, 2003, 05:46 PM

Previous topic - Next topic

haro

when i receive Login Failed. i can't get it to reconnect.  

Banana fanna fo fanna

#1
That sucks.

ILurker

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

haro

#3
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

ILurker

#4
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

Quotetest1test2test3test4

tA-Kane

#5
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?
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

haZe

that should be in txtchat_change (what kane said)

tA-Kane

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.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Etheran

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