|
-
Sep 6th, 2003, 03:21 PM
#1
Thread Starter
Addicted Member
message queue [resolved]
whats the best way to have a bunch of messages queued then sent every 1250 ms?
ive looked everywhere for a way to do this...but i cant find any, and my attempts have failed, and nobody i kno can help make it work..
Last edited by R.a.B.B.i.T; Sep 7th, 2003 at 09:03 PM.
-
Sep 6th, 2003, 04:23 PM
#2
The picture isn't missing
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Sep 6th, 2003, 05:01 PM
#3
Thread Starter
Addicted Member
either text from a textbox (the send function is in a module) or encrypted data is what calls the send function
if a user sends too many messages in too short a time, they are disconnected from the server and ipbanned
-
Sep 6th, 2003, 05:19 PM
#4
The picture isn't missing
oh winsock. ok.
you make a collection that holds the strings the guy sends,you could have a time run at 1250 ms, then whenever the timer sub is called you remove the next item to be sent and Send it.
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Sep 6th, 2003, 06:21 PM
#5
Thread Starter
Addicted Member
im using
VB Code:
Private Sub SendQueue_Timer()
If SendMessage(x) <> "" Then
CleanSlateBot1.Send SendMessage(x)
If left(SendMessage(x), 1) <> "/" Then
If left(SendMessage(x), 3) <> "AB " And left(SendMessage(x), 4) <> "CBE " _
And left(SendMessage(x), 4) <> "RBE " And left$(SendMessage(x), 2) <> "H&" _
And left$(SendMessage(x), 5) <> "cHEX " And left$(SendMessage(x), 1) <> "£" Then
AddChat &H8000000D, "<", vbWhite, lblMe.Caption, &H8000000D, "> ", vbWhite, SendMessage(x)
End If
End If
SendMessage(x) = ""
If x = 500 Then x = 0
x = x + 1
End Sub
Public Function Send(message As String)
checkmsg:
If x > 0 And x < 501 Then
If [b]SendMessage(x) = ""[/b] Then
SendMessage(x) = message
Else
x = x + 1
GoTo checkmsg
End If
Else
SendMessage(1) = message
x = 1
End If
End Function
the bold gets a 'Subscript out of range'
-
Sep 6th, 2003, 11:12 PM
#6
The picture isn't missing
the reason i said to use collections was because it is easier than to move items down the list using an array. with collections you could just remove any item and the rest of the items shift accordingly, but with arrays you need to do all that yourself.
but looking at your code.... what is 'x'?
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Sep 7th, 2003, 09:02 PM
#7
Thread Starter
Addicted Member
x is an integer thats dimmed in option explicit
ps: i fixed this a different way
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|