HolyEnd 0 Newbie Poster

I'm making a program that involves the copy and pasting of a piece of text into a TEditBox and submitting the text into 4 different columns in a TListBox. This program is actually for a game called FlashFlashRevolution (great free, online, ddr-like game if anyone wants to try it out). I thought you might need to know that for what I'm about to say next.

I know that the way to add columns to a TListBox is like:

ListBox1.Items.Add('Text'^I'Text'^I'Text'^I'Text') ;

At first I tried to do something like (at least I'm pretty sure this is how I set it up...):

ListBox1.Items.Add('EditBox1.Text'^I'EditBox2.Text'^I'EditBox3.Text'^I'EditBox4.Text') ;

I was kind of hoping that this would work so that it would at least be possible for the user to input there own stuff into each column, but this didn't work.
So instead what I did was I made it so

ListBox1.Items.Add('Rank'^I'Difficulty'^I'Song'^I'Score') ;

appeared on FormCreate to differentiate what would be in each column. Then I set up a TEditBox where the user can paste copied scores from the clipboard into and have them be added to the TListBox (like bellow).

procedure TForm1.AddClick(Sender: TObject);
begin
    ListBox1.Items.Add(Edit1.Text) ;
end;

The input string of the user looks something like (Rank, Difficulty, Song, Score):
1 2 Excite Bike 49,600*

The problem with this is that I don't think each string is being sorted into each column. My question to the community is: is it possible to sort something in the setup [above] into its corresponding columns …

HolyEnd 0 Newbie Poster

Thank you. :) You've helped me a great deal.

HolyEnd 0 Newbie Poster

Wow thank you. I maybe have to come back here and ask you a bit more about this if I can't get it to work. But it looks like you helped me a ton. Thank you. :)

Edit: I do have a couple of questions about this.
1. What is the dc: HDC; thing? I don't understand what that is.
2. Does this win := GetDesktopWindow; get only my desktop or can I make it to get an open window?
3. What is the dc (& DC) thing? dc := GetDC( win )

Sorry for these very "newbie" questions.

HolyEnd 0 Newbie Poster

I'm sorry, this whole thing is really wrong. I'm just trying to get the color of a pixel on the screen from another program. I kind of put bits and pieces together from source codes I've found and put them all into that thing. Is there any way for delphi to read a certain pixel and have it do something if it is not a certain color?

HolyEnd 0 Newbie Poster

I need a little bit of help with a program I am making. I have most of the program made except for this part:

procedure Button1Click (Sender: TObject);
begin
   Button1.Click := public int getPixel(int x, int y);
      if (R=R+10) or (G=G+10) or (B=B+10) then
		// Simulate a key press
			keybd_event(VK_NUMPAD4,0xcb,0 , 0);

      // Simulate a key release
			keybd_event(VK_NUMPAD4,0xcb, KEYEVENTF_KEYUP,0);
		else
			null // do nothing (can null be used?)...
end;

I know that this isn't right because I get errors when I try to compile the program (errors related to this). This code is suppose to do something like this:

Click on button 1
When button 1 is clicked search for "pixel x, y"'s color 
If the red, green, or blue value has increased by 10 then
Simulate a keypress
Else
Do nothing

I can't figure out how to get something equivalent to what I just said. Also during the whole "if RGB increased by 10" bit, the color starts out as black (0,0,0) and if any of the RGB values increase by 10 then the key is pressed but do I need to specify that the color changes from black to another color or can Delphi conclude that if there are any changes then click? I also just wanted to add that this is suppose to find the color of a pixel on a swf loaded up in Delphi made web browser. I am very new to Delphi (I used to use scripting based programs instead of actual programming languages). …