Results 1 to 3 of 3

Thread: Finding a new listbox Item.

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2005
    Location
    Philadelphia
    Posts
    48

    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.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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?

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2005
    Location
    Philadelphia
    Posts
    48

    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
  •  



Click Here to Expand Forum to Full Width