Emoticons in the eclipse chat bar

Alright this allow the chat to be a little more lively 😄
with this you can use symbols in the chat 😄

you could in theory even show a special sign (for mods/admins or price winnars)

so check the image i uploaded and here’s the code (all client side)

Public Sub AddText(ByVal Msg As String, ByVal color As Integer)
Dim Lenght As Long, X As Long, EmoLenght As Long, EmoString As String, Check As Boolean

frmMirage.txtChat.SelStart = Len(frmMirage.txtChat.Text)
    frmMirage.txtChat.SelColor = QBColor(color)
   
    frmMirage.txtChat.SelText = vbNewLine
    For Lenght = 1 To Len(Msg)
        Check = False
        For X = 1 To Val(ReadINI(“Emoticons”, “Max”, App.Path & “\Config.ini”))
            EmoLenght = Len(ReadINI(“Emoticons”, “Emo” & X & “String”, App.Path & “\Config.ini”))
            EmoString = Mid$(Msg, Lenght, EmoLenght)
            If EmoString = Trim$(ReadINI(“Emoticons”, “Emo” & X & “String”, App.Path & “\Config.ini”)) Then
                If Trim$(ReadINI(“Emoticons”, “Emo” & X & “File”, App.Path & “\Config.ini”)) <> vbNullString Then
                    Check = True
                    Lenght = Lenght + EmoLenght - 1
                    InsertPictureInRichTextBox frmMirage.txtChat, LoadPicture(App.Path & “\GFX” & Trim$(ReadINI(“Emoticons”, “Emo” & X & “File”, App.Path & “\Config.ini”)) & “.bmp”)
                End If
            End If
        Next X
       
        If Check = False Then
            frmMirage.txtChat.SelText = Mid$(Msg, Lenght, 1)
        End If
    Next Lenght
   
    frmMirage.txtChat.SelStart = Len(frmMirage.txtChat.Text) - 1
    If frmMirage.chkAutoScroll.Value = Unchecked Then
        frmMirage.txtChat.SelStart = frmMirage.txtChat.SelStart
    End If
End Sub

Public Declare Function SendMessage Lib “user32” Alias “SendMessageA” (ByVal _
    hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _
    lParam As Any) As Long
Publi Const WM_PASTE = &H302

Sub InsertPictureInRichTextBox(RTB As RichTextBox, Picture As StdPicture)
    Clipboard.Clear
    Clipboard.SetData Picture
    SendMessage RTB.hwnd, WM_PASTE, 0, 0
    Clipboard.Clear
End Sub

Great work. Thanks for the edit.

This is a great addition to the chat box.

TY 😄

and where exactly do i put this?
you didnt specify that ya knwo XD

Damian666

all client source,
just find

Public Sub AddText

and alter it to mine,
and the other code can be placed anywhere

Another nice mod keep them coming man

unnown u are a good person! hahaha thaaank you 🙂

TY 😄

InsertPictureInRichTextBox frmMirage.txtChat, LoadPicture(App.Path & "\GFX\" & Trim$(ReadINI("Emoticons", "Emo" & X & "File", App.Path & "\Config.ini")) & ".bmp")

what is this looking for?
because mine is not working, and i think its related to this 😕

Damian666

it’s looking for an ini…
called config.ini

xD …
i know that, but it seems its looking for a entry i dont have O.o

damian666

it did works. thanks for the Script. 😉

then why teh hell is mine not working? 😞

damn it xD

damian666

you need to make an ini 😛

well, what about you tell me what and where then?
ofcourse i do have the config.ini xd

damian666

out of my head because im to lazy to look at my own code, so are you i think

[Emoticons]
Max=1

Emo1String=suck
Emo1File=suck.bmp

(put that at the bottom of your config.ini)

thank you ^^

damian666

I explain how to use this?

error
InsertPictureInRichTextBox frmMirage.txtChat, LoadPicture(App.Path & “\GFX” & Trim$(ReadINI(“Emoticons”, “Emo” & X & “File”, App.Path & “\Config.ini”)) & “.bmp”)

I already wrote this information in config.ini
[Emoticons]
Max = 1

Emo1String = suck
Emo1File = suck.bmp

[Emoticons]
Max = 1

Emo1String = suck
Emo1File = suck

without the .bmp part sorry 😛

Log in to reply