Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Delphi] [Help] Reading Info in a Text Box

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Thu Jul 12, 2007 11:21 am    Post subject: [Delphi] [Help] Reading Info in a Text Box Reply with quote

Well, I have had past experiences programming in C#, and I'm taking on Delphi now.

What I would like to know is how to extract information from a Text Box.

In C#, it would be something like

Code:

string a = textBox1.Text;


And I understand that in Delphi I would have to do something like

Code:

procedure whatever
var
  string a;
begin
  a := RichEdit1.Text
end;
end.


Or something, but it gives me an error when I do that. I have searched many websites to try to figure this out, but all searches have come up empty. Could someone help?
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Thu Jul 12, 2007 11:22 am    Post subject: Reply with quote

what error did you get?
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Thu Jul 12, 2007 11:26 am    Post subject: Reply with quote

Err, it said something like "Undeclared identifier a", and "Identifier expected, but A found".

But by changing it to

Code:

a : string;


It worked.

~~

Note to self, Delphi and C are VERY different. x-x

Edit:

Getting another error when I try:

Code:

procedure whatever
var
  a : string;
begin
  a := 'Hehe Waffles';
  if (RichEdit1 <> a)
  then ShowMessage('d00d');
end;
end.


It says that STRING and TRICHEDIT are incompatible types.
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Thu Jul 12, 2007 11:30 am    Post subject: Reply with quote

they're very different languages Rolling Eyes
_________________
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Thu Jul 12, 2007 11:32 am    Post subject: Reply with quote

you want the text from the rich edit: RichEdit1.Text
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Thu Jul 12, 2007 11:33 am    Post subject: Reply with quote

appalsap wrote:
you want the text from the rich edit: RichEdit1.Text


Thank you very much! Though it seems like a bit of a careless mistake on my part. Oh well :roll:
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites