• Welcome to Valhalla Legends Archive.
 

Sending Text

Started by FLiPPY_, August 03, 2003, 09:58 PM

Previous topic - Next topic

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

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

When I Hit Enter.. it makes a *dun* noise. :-\

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

FLiPPY_

#2
Quote from: DarkMinion on August 03, 2003, 10:28 PM
Ok...all you do is print it to screen, you don't even try to send anything...

Like the Print Screen Button? I'm confused.. can u be more specific?

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

FuZe

Try This

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

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

FuZe

Quote from: FLiPPY_ on August 03, 2003, 10:49 PM
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..
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........


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

FLiPPY_

Wow.. Thanks.. it does work! Yes!

DarkMinion

Read my signature for explanation.