Valhalla Legends Forums Archive | Battle.net Bot Development | Sending Text

AuthorMessageTime
FLiPPY_
Ok.. I have everything worked out.. I can view text.. see whispers.. connect.. and everything.. But I can't Send Msg's.. here's my code
[code]
Private Sub txtSend_KeyPress(keyascii As Integer)
If CleanSlateBot1.Connected = True Then
mUsername = GetStuff("Configuration", "Username")
strSend = txtSend.Text
txtSend.Text = ""
If keyascii = 13 And txtSend.Text <> "" Then
AddSpeech vbWhite, " [" & Format$(Time, "Hh:Nn:Ss") & "] ", vbCyan, "<", vbBlue, mUsername, vbCyan, "> ", vbWhite, strSend

End If
End If
End Sub
[/code]
When I Hit Enter.. it makes a *dun* noise. :-\
August 4, 2003, 2:58 AM
DarkMinion
Ok...all you do is print it to screen, you don't even try to send anything...

And try keyascii = 0 to get rid of the beep
August 4, 2003, 3:28 AM
FLiPPY_
[quote author=DarkMinion link=board=17;threadid=2195;start=0#msg16965 date=1059967691]
Ok...all you do is print it to screen, you don't even try to send anything...
[/quote]

Like the Print Screen Button? I'm confused.. can u be more specific?
August 4, 2003, 3:31 AM
FuZe
What hes saying is you dont have any code to send the data to BNET, all your doing is showing what you typed up on the screen.. rofl.. that sounded exactly like what he sed...
August 4, 2003, 3:36 AM
FuZe
Try This
[code]
Private Sub txtSend_KeyPress(keyascii As Integer)
If CleanSlateBot1.Connected = True Then
mUsername = GetStuff("Configuration", "Username")
strSend = txtSend.Text
txtSend.Text = ""
If keyascii = 13 And txtSend.Text <> "" Then
AddSpeech vbWhite, " [" & Format$(Time, "Hh:Nn:Ss") & "] ", vbCyan, "<", vbBlue, mUsername, vbCyan, "> ", vbWhite, strSend
CleanSlateBot1.Send strSend


End If
End If
End Sub
[/code]
August 4, 2003, 3:38 AM
FLiPPY_
Lol.. now it only allows me to type in 1 char. If you type another it just over wrights the last one. It still doesn't send..
August 4, 2003, 3:49 AM
FuZe
[quote author=FLiPPY_ link=board=17;threadid=2195;start=0#msg16972 date=1059968999]
Lol.. now it only allows me to type in 1 char. If you type another it just over wrights the last one. It still doesn't send..
[/quote]
whoops thats cuz ur code initially was wrong let me rewrite this.. u have
txtSend.Text = "" before If keyascii = 13 And txtSend.Text <> "" Then

try this........

[code]
Private Sub txtSend_KeyPress(keyascii As Integer)
If CleanSlateBot1.Connected = True Then
mUsername = GetStuff("Configuration", "Username")
If keyascii = 13 And txtSend.Text <> "" Then
AddSpeech vbWhite, " [" & Format$(Time, "Hh:Nn:Ss") & "] ", vbCyan, "<", vbBlue, mUsername, vbCyan, "> ", vbWhite, strSend
CleanSlateBot1.Send text1.text
txtSend.Text = ""


End If
End If
End Sub
[/code]
August 4, 2003, 4:06 AM
FLiPPY_
Wow.. Thanks.. it does work! Yes!
August 4, 2003, 4:12 AM
DarkMinion
Read my signature for explanation.
August 4, 2003, 5:30 AM

Search