Private Sub QueTimer_Timer()
Dim RemoveItem As String
If Que.ListCount = "0" Then
QueTimer.Interval = QueTimer.Interval - 300
End If
If Que.ListCount =>1 Then
Main.CleanSlateBot1.Send Que.List(0)
Que.RemoveItem Que.List(0)
QueTimer.Interval = QueTimer.Interval + 300
End If
If QueTimer.Interval < 1000 Then
QueTimer.Interval = 1000
End If
If QueTimer.Interval > 15000 Then
QueTimer.Interval = 15000
End If
If Que.ListCount > 30 Then
AddChat "Queue Cleared" & vbNewLine, vbRed
Que.Clear
End If
End Sub
That is my code for my que timer and its being evil. I really don't know how to use listboxs because I never use them... It keeps giving me an error on this line...
Que.RemoveItem Que.List(0)
If you posted this on the vb section you might get more responces but...
As far as I know for a listbox to remove it you need to que.remove (i).
(If I am wrong I am sorry...pain pills are fun to have because I can't remember much)
que.Remove takes in an integer as it's parameter, and your giving it a string.
Try
que.Remove 0
On a side note, your TAB key is dieing for some attention. :(
Unfixed code but "formatted".
Private Sub QueTimer_Timer()
Dim RemoveItem As String
If Que.ListCount = "0" Then
QueTimer.Interval = QueTimer.Interval - 300
End If
If Que.ListCount >= 1 Then
Main.CleanSlateBot1.Send Que.List(0)
Que.RemoveItem Que.List(0)
QueTimer.Interval = QueTimer.Interval + 300
End If
If QueTimer.Interval < 1000 Then
QueTimer.Interval = 1000
End If
If QueTimer.Interval > 15000 Then
QueTimer.Interval = 15000
End If
If Que.ListCount > 30 Then
AddChat "Queue Cleared" & vbNewLine, vbRed
Que.Clear
End If
End Sub
Quote from: Eli_1 on May 18, 2004, 09:48 AM
On a side note, your TAB key is dieing for some attention. :(
Actually I removed the tab space entries when adding my code here...
I think my code is working because its been saying hello all day without getting kicked...
Quote from: Blaze on May 18, 2004, 02:39 PM
Quote from: Eli_1 on May 18, 2004, 09:48 AM
On a side note, your TAB key is dieing for some attention. :(
Actually I removed the tab space entries when adding my code here...
I think my code is working because its been saying hello all day without getting kicked...
sure you're not muted? :P
Yes because my my other bot picked up all the chating...
Now I have to find a way to make it display the text when it is sent rather then when it is typed and entered...
Quote from: Blaze on May 18, 2004, 06:58 PM
Yes because my my other bot picked up all the chating...
Now I have to find a way to make it display the text when it is sent rather then when it is typed and entered...
You might be able to use Socket_SendComplete(), then again you might not...
off-topic....
Mahaha, the first thing I thought of when I saw the title was....
ListBox1.Remove(things)
8)
You should really use arrays to store your queue, especially if you're not displaying the listbox....
Also, the queue also depends on the size of the message, not just how many messages in an interval...
Quote
Now I have to find a way to make it display the text when it is sent rather then when it is typed and entered...
That's just a matter of how you send text, the Send function should both add the text to the display and actually send the data to battle.net...This function would be called every time the queue function has passed....