• Welcome to Valhalla Legends Archive.
 

AddChat Going Funky

Started by CrAz3D, March 09, 2004, 01:30 PM

Previous topic - Next topic

CrAz3D

http://crazed.no-ip.com/images/addchat.jpg
Private Sub mnuNPCon_Click()
NPUsername = frmNP.txtUsername.text
NPPassword = frmNP.txtPassword.text
NPIP = frmNP.txtIP.text

tcp.AddChat vbYellow, "NP Server Connecting to: " & NPIP
NP.Close
NP.Connect NPIP, 1337
End Sub

Public Sub AddChat(ParamArray saElements() As Variant)

If frmOptions.chkLockChat = vbChecked Then
   Exit Sub
Else
   Dim i As Integer
   If Len(Form1.RTB.text) > 50000 Then
       With Form1.RTB
           .Visible = False
           .SelStart = 0
           .SelLength = InStr(1, .text, vbLf, vbTextCompare)
           .SelText = vbNullString
           .Visible = True
       End With
   End If
   With Form1.RTB
       .SelStart = Len(.text)
       .SelLength = 0
       .SelColor = vbWhite
       .SelText = "[" & Time & "] "
       .SelStart = Len(.text)
   End With
   For i = LBound(saElements) To UBound(saElements) Step 2
       With Form1.RTB
           .SelStart = Len(.text)
           .SelLength = 0
           .SelColor = saElements(i)
           .SelText = saElements(i + 1) & Left$(vbCrLf, -2 * CLng((i + 1) = UBound(saElements)))
           .SelStart = Len(.text)
       End With
   Next i
End If
End Sub



You can see for yourself what it is doing.  It does it USUALLY when I use the KeyBoard shortcut I set to mnuNPCon, which is ctrl
+E.  Is that an option for richtexts to change the allignment?


EDIT: Well, I hit post too soon. ctrl+E is an alignment for RichText, is there a way to disable that is my new question.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

SNiFFeR


CrAz3D

rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Stealth

Try debug.printing what you send to AddChat.

What is most probably causing the error is something wrong in one of the calls you're making to AddChat. (I haven't looked at the code but it's hard to mess AddChat up.) Figure out what's supposed to be displayed.
- Stealth
Author of StealthBot

CrAz3D

It was the ctrl+E, it's a shortcut for RichTxt
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Newby

Quote from: CrAz3D on March 09, 2004, 08:54 PM
It was the ctrl+E, it's a shortcut for RichTxt

IIRC, CTRL + E moves it to center.

CTRL + R moves it to right :)
- Newby

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote<TehUser> Man, I can't get Xorg to work properly.  This sucks.
<torque> you should probably kill yourself
<TehUser> I think I will.  Thanks, torque.

CrAz3D

Yah, I found that would when I put ANOTHER shortcut to ctrl+R, lol.

HOW GAY!
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Adron

A solution might be not to allow focus to stay on the rich text box?

o.OV

#8
Quote from: Adron on March 10, 2004, 11:36 AM
A solution might be not to allow focus to stay on the rich text box?

That is similar to how I handle my rtb for an old chat bot.

To copy text ..
I set it up to copy selected text and then lose focus when mouse button is released.

Add-On:
craz3d..
what are these shortcuts for anyways..
the ones you are adding I mean.
If the facts don't fit the theory, change the facts. - Albert Einstein

CrAz3D

Just menu items, Connect & Disconnect. (BNET & Newby's Server)
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...