-
Oct 5th, 2009, 02:54 AM
#1
Thread Starter
Member
Finding a new listbox Item.
I know my title isn't as descriptive as I'd like, couldn't explain it in a title so I'll try to do so here. Anyway what I'm trying to do here is I load chatlines from memory from a game.
Code:
while (_ff.Chat.IsNewLine)
{
listBox2.Items[12] = _ff.Chat.GetLineRaw(0).LineText;
listBox2.Items[11] = _ff.Chat.GetLineRaw(1).LineText;
listBox2.Items[10] = _ff.Chat.GetLineRaw(2).LineText;
listBox2.Items[9] = _ff.Chat.GetLineRaw(3).LineText;
listBox2.Items[8] = _ff.Chat.GetLineRaw(4).LineText;
listBox2.Items[7] = _ff.Chat.GetLineRaw(5).LineText;
listBox2.Items[6] = _ff.Chat.GetLineRaw(6).LineText;
listBox2.Items[5] = _ff.Chat.GetLineRaw(7).LineText;
listBox2.Items[4] = _ff.Chat.GetLineRaw(8).LineText;
listBox2.Items[3] = _ff.Chat.GetLineRaw(9).LineText;
listBox2.Items[2] = _ff.Chat.GetLineRaw(10).LineText;
listBox2.Items[1] = _ff.Chat.GetLineRaw(11).LineText;
listBox2.Items[0] = _ff.Chat.GetLineRaw(12).LineText;
}
what this does is gets the line text for all all those indexes and puts them at the index in the listbox, but when a new line is read all lines shift one up one index, my app is designed to read them for a certain phrase by searching all 13 indexes of the listbox but once the certain item is read already it's still going to trigger the event until it gets pushed out of the indexes I used, what I'm trying to do is after it's processed make a way to determine if it's already be triggered so that way it only reads new instances of the certain phrase.
-
Oct 6th, 2009, 06:28 AM
#2
Re: Finding a new listbox Item.
If you always want it to read new instances, then why not just remove it from the listbox as soon as it is read?
-
Oct 7th, 2009, 12:39 AM
#3
Thread Starter
Member
Re: Finding a new listbox Item.
It's read directly from the memory so even if I do remove it, it will just be added again when the memory is updated.
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
|