I cleared it out:(Quote:
Originally posted by Pc_Madness
Check the Sent Items?? Maybe it will have a quote of the needed code in it??
Printable View
I cleared it out:(Quote:
Originally posted by Pc_Madness
Check the Sent Items?? Maybe it will have a quote of the needed code in it??
Quote:
Originally posted by Nightwalker83
I cleared it out:(
PM McBrain for it then?? He may still have it.
What does the code do?
mc Brain posted all the code I asked for. I got the code I'm looking for from Bruce. The code need makes the txtmess.text = txtmess.text & data
Oh ok. :)
Yeah I suppose I can wait but this is really p*ssing me off.Quote:
Originally posted by Pc_Madness
Oh ok. :)
Quote:
Originally posted by Nightwalker83
Yeah I suppose I can wait but this is really p*ssing me off.
Ok.... explain to me exactly what your trying to do, as I should be able to give you the code for it...
I was under the impression you just wanted to add the new message to the Main Chat (txtmess)
VB Code:
Private Sub Messlis_DataArrival(Index As Integer, ByVal bytesTotal As Long) Dim sInputArr() As String Dim sInputBuff As String: sInputBuff = mess Messlis(intmax).GetData str 'Get the message string If InStr(1, str, "|MESSAGE|") <> 0 Then mess = Mid$(str, 10, Len(str)) Dim objFrmMain As New frmMain sInputBuff = mess 'Load the string buffer with the INCOMMING message (wich may contain swear words!) End If 'Check to see if there is data in the listbox that matches the message string 'Split up the String into the Array If InStr(sInputBuff, " ") Then 'More than 1 word, so split sInputArr = Split(sInputBuff, " ") Else ReDim sInputArr(0) 'Only 1 word, so place it in the Array sInputArr(0) = sInputBuff End If For x = 0 To UBound(sInputArr) For a = 0 To frmSetup.Lstblock.ListCount - 1 If UCase(frmSetup.Lstblock.List(a)) = UCase(sInputArr(x)) Then sInputArr(x) = String(Len(frmSetup.Lstblock.List(a)), "*") txtMess.Text = Join(sInputArr, " ") 'Write out to the TextBox the 'corrected' message text. ie hashed out the swear words. txtMess.SelStart = Len(txtMess.Text) Next a Next x End Sub
That doesn't work because it will just over write who was in the box instead of adding it.
VB Code:
Private Sub Messlis_DataArrival(Index As Integer, ByVal bytesTotal As Long) Dim sInputArr() As String Dim sInputBuff As String: sInputBuff = mess Messlis(intmax).GetData str 'Get the message string If InStr(1, str, "|MESSAGE|") <> 0 Then mess = Mid$(str, 10, Len(str)) Dim objFrmMain As New frmMain sInputBuff = mess 'Load the string buffer with the INCOMMING message (wich may contain swear words!) End If 'Check to see if there is data in the listbox that matches the message string 'Split up the String into the Array If InStr(sInputBuff, " ") Then 'More than 1 word, so split sInputArr = Split(sInputBuff, " ") Else ReDim sInputArr(0) 'Only 1 word, so place it in the Array sInputArr(0) = sInputBuff End If For x = 0 To UBound(sInputArr) For a = 0 To frmSetup.Lstblock.ListCount - 1 If UCase(frmSetup.Lstblock.List(a)) = UCase(sInputArr(x)) Then sInputArr(x) = String(Len(frmSetup.Lstblock.List(a)), "*") 'this the bit??? txtMess.Text = txtMess.text + vbcrlf + Join(sInputArr, " ") 'Write out to the TextBox the 'corrected' message text. ie hashed out the swear words. txtMess.SelStart = Len(txtMess.Text) Next a Next x End Sub
Yeah ;)Quote:
Originally posted by Pc_Madness
VB Code:
Private Sub Messlis_DataArrival(Index As Integer, ByVal bytesTotal As Long) Dim sInputArr() As String Dim sInputBuff As String: sInputBuff = mess Messlis(intmax).GetData str 'Get the message string If InStr(1, str, "|MESSAGE|") <> 0 Then mess = Mid$(str, 10, Len(str)) Dim objFrmMain As New frmMain sInputBuff = mess 'Load the string buffer with the INCOMMING message (wich may contain swear words!) End If 'Check to see if there is data in the listbox that matches the message string 'Split up the String into the Array If InStr(sInputBuff, " ") Then 'More than 1 word, so split sInputArr = Split(sInputBuff, " ") Else ReDim sInputArr(0) 'Only 1 word, so place it in the Array sInputArr(0) = sInputBuff End If For x = 0 To UBound(sInputArr) For a = 0 To frmSetup.Lstblock.ListCount - 1 If UCase(frmSetup.Lstblock.List(a)) = UCase(sInputArr(x)) Then sInputArr(x) = String(Len(frmSetup.Lstblock.List(a)), "*") 'this the bit??? txtMess.Text = txtMess.text + vbcrlf + Join(sInputArr, " ") 'Write out to the TextBox the 'corrected' message text. ie hashed out the swear words. txtMess.SelStart = Len(txtMess.Text) Next a Next x End Sub
When it snd the data the other txtmess.text:
Data
instead of
Data
Data
Have you tried my code??
"Nope, oh, and heres your ice cream that I wouldn't give to you the other day cause I was being a......"
:D
Yeah but it sends about four lines at once when I only need one.Quote:
Originally posted by Pc_Madness
"Nope, oh, and heres your ice cream that I wouldn't give to you the other day cause I was being a......"
:D
Of the same text?
[EXAMPLE]Quote:
Originally posted by Pc_Madness
Of the same text?
I send "hello"
I get:
Helllo
Hello
Hello
Hello
[EXAMPLE]
Instead of:
[EXAMPLE]
I send "Hello"
I get
Hello
Well.... logic would say that the link is reposting the message 4 times.
But....
VB Code:
Private Sub Messlis_DataArrival(Index As Integer, ByVal bytesTotal As Long) Dim sInputArr() As String Dim sInputBuff As String: sInputBuff = mess Messlis(intmax).GetData str 'Get the message string If InStr(1, str, "|MESSAGE|") <> 0 Then mess = Mid$(str, 10, Len(str)) Dim objFrmMain As New frmMain sInputBuff = mess 'Load the string buffer with the INCOMMING message (wich may contain swear words!) End If 'Check to see if there is data in the listbox that matches the message string 'Split up the String into the Array If InStr(sInputBuff, " ") Then 'More than 1 word, so split sInputArr = Split(sInputBuff, " ") Else ReDim sInputArr(0) 'Only 1 word, so place it in the Array sInputArr(0) = sInputBuff End If For x = 0 To UBound(sInputArr) For a = 0 To frmSetup.Lstblock.ListCount - 1 If UCase(frmSetup.Lstblock.List(a)) = UCase(sInputArr(x)) Then sInputArr(x) = String(Len(frmSetup.Lstblock.List(a)), "*") 'this the bit??? txtMess.Text = txtMess.text + Join(sInputArr, " ") 'Write out to the TextBox the 'corrected' message text. ie hashed out the swear words. Doevents txtMess.SelStart = Len(txtMess.Text) Doevents Next a Next x End Sub
If that doesn't work... try taking the "Next a" bit and placing it above the txtMess.text = txtmess.text .... bit.
Sorry but that didn't help.Quote:
Originally posted by Pc_Madness
Well.... logic would say that the link is reposting the message 4 times.
But....
VB Code:
Private Sub Messlis_DataArrival(Index As Integer, ByVal bytesTotal As Long) Dim sInputArr() As String Dim sInputBuff As String: sInputBuff = mess Messlis(intmax).GetData str 'Get the message string If InStr(1, str, "|MESSAGE|") <> 0 Then mess = Mid$(str, 10, Len(str)) Dim objFrmMain As New frmMain sInputBuff = mess 'Load the string buffer with the INCOMMING message (wich may contain swear words!) End If 'Check to see if there is data in the listbox that matches the message string 'Split up the String into the Array If InStr(sInputBuff, " ") Then 'More than 1 word, so split sInputArr = Split(sInputBuff, " ") Else ReDim sInputArr(0) 'Only 1 word, so place it in the Array sInputArr(0) = sInputBuff End If For x = 0 To UBound(sInputArr) For a = 0 To frmSetup.Lstblock.ListCount - 1 If UCase(frmSetup.Lstblock.List(a)) = UCase(sInputArr(x)) Then sInputArr(x) = String(Len(frmSetup.Lstblock.List(a)), "*") 'this the bit??? txtMess.Text = txtMess.text + Join(sInputArr, " ") 'Write out to the TextBox the 'corrected' message text. ie hashed out the swear words. Doevents txtMess.SelStart = Len(txtMess.Text) Doevents Next a Next x End Sub
You might have to upload your project... cause I can't work out whats going on with these loops. This is the code for moving the Next a.
VB Code:
Private Sub Messlis_DataArrival(Index As Integer, ByVal bytesTotal As Long) Dim sInputArr() As String Dim sInputBuff As String: sInputBuff = mess Messlis(intmax).GetData str 'Get the message string If InStr(1, str, "|MESSAGE|") <> 0 Then mess = Mid$(str, 10, Len(str)) Dim objFrmMain As New frmMain sInputBuff = mess 'Load the string buffer with the INCOMMING message (wich may contain swear words!) End If 'Check to see if there is data in the listbox that matches the message string 'Split up the String into the Array If InStr(sInputBuff, " ") Then 'More than 1 word, so split sInputArr = Split(sInputBuff, " ") Else ReDim sInputArr(0) 'Only 1 word, so place it in the Array sInputArr(0) = sInputBuff End If For x = 0 To UBound(sInputArr) For a = 0 To frmSetup.Lstblock.ListCount - 1 If UCase(frmSetup.Lstblock.List(a)) = UCase(sInputArr(x)) Then sInputArr(x) = String(Len(frmSetup.Lstblock.List(a)), "*") 'this the bit??? Next a txtMess.Text = txtMess.text + Join(sInputArr, " ") 'Write out to the TextBox the 'corrected' message text. ie hashed out the swear words. Doevents txtMess.SelStart = Len(txtMess.Text) Doevents Next x End Sub
I've solved the problem:)Quote:
Originally posted by Pc_Madness
If that doesn't work... try taking the "Next a" bit and placing it above the txtMess.text = txtmess.text .... bit.
I have another one:)
With that code I submitted I need to hash out words that aren't allow. I can do this but not all the words in the listbox are hashed out.
With that code above?
Don't you have to create a list of words and then check if any of them words in message match up with some of words in the naughty list?
Yes I can do that expect not all the words get hashed out:(Quote:
Originally posted by Pc_Madness
With that code above?
Don't you have to create a list of words and then check if any of them words in message match up with some of words in the naughty list?
lol....
Are your words spelt correctly?
:confused:
YeahQuote:
Originally posted by Pc_Madness
lol....
Are your words spelt correctly?
:confused:
but it would hash out the first then skip the second and what not.
Best to talk to McBrain or whoever it was then...
I was trying to get it going last night... but, my method was pretty crappy.
Anyways, Hi All :)
Story Time.
Everyone remembers the Web Counter thing at this school I goto... well, we arrived, and it was ...60,000?? I can't remember what it was, but its in a post above somewhere.
Anyways, when I left, about 4 hours later, it was at 170,000
:D
Can you tell we get abit bored!! :)
Which site was it for?Quote:
Originally posted by Pc_Madness
Best to talk to McBrain or whoever it was then...
I was trying to get it going last night... but, my method was pretty crappy.
Anyways, Hi All :)
Story Time.
Everyone remembers the Web Counter thing at this school I goto... well, we arrived, and it was ...60,000?? I can't remember what it was, but its in a post above somewhere.
Anyways, when I left, about 4 hours later, it was at 170,000
:D
Can you tell we get abit bored!! :)
The schools intranet, which is down apparently, so I can't give ya a link to it or anything...
:(
Oh ok :pQuote:
Originally posted by Pc_Madness
The schools intranet, which is down apparently, so I can't give ya a link to it or anything...
:(
So, how was your day?Quote:
Originally posted by Nightwalker83
Oh ok :p
It was ok I had math and english today. I've only got about six to eight weeks left of school this year:)Quote:
Originally posted by Pc_Madness
So, how was your day?
Cool :DQuote:
Originally posted by Nightwalker83
It was ok I had math and english today. I've only got about six to eight weeks left of school this year:)
Nearly Party time. :)
I have.... 3.5 weeks + 1 week of exams. :D
You in yr 11?Quote:
Originally posted by Pc_Madness
Cool :D
Nearly Party time. :)
I have.... 3.5 weeks + 1 week of exams. :D
Yeppers :)
morning all
Howdy :)
morning vick :) just dropping in for a min or two...
hey kiddies ;) how are you both?
I'm alright, u?
Alive as usual, :)... thats about all there is to say for me, how bout you?
like ****
Hungover? or ... something else?
I wish i was hungover, i been sober way too long.
Vicky can't drink :(
#?
Well, she can't. That's why she's not hungover :p
Morning, btw :)
oh thats right, anywaz she disappeared of MSN too :(
She is lucky because drinking can mess your life up:(Quote:
Originally posted by parksie
Vicky can't drink :(
I'm in college. I'm feeling a little better now, but I could *really* do with a drink. It's not fair :(
I think that's whyy I was feeling so bad ;) How are you today cariad?Quote:
Originally posted by parksie
Well, she can't. That's why she's not hungover :p
Morning, btw :)
Hiya Vickster :)
Hi Vicky, Big ears
how r u both?
Hey Vicky, Bonk, Sleepwalker :)
Hey! Furious activity in here :p
Let's talk about chicken :bwawk:
I like chicken, I like liver, Miaowmix, Miaowmix, please deliver...
hi
Hey sweetie *mwah* how are you?Quote:
Originally posted by Bonker Gudd
Hiya Vickster :)
I'm suffering from a mild dose of flu, or a cold or something :o
Typical October stuff I suppose.
Looking forward to the footy tonight!
Hi macai :)
Aww, poor baby *huggles* I hope you're wearing red!Quote:
Originally posted by Bonker Gudd
I'm suffering from a mild dose of flu, or a cold or something :o
Typical October stuff I suppose.
Looking forward to the footy tonight!
I'm going to wear black and drink myself silly in a corner :p
blaaaaah :p You should be wearing red! I am!
Being half welsh I have divided loyalties :p I shall have a hunt through my cloths!