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] Check for String in ItemBox
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Wed Dec 12, 2007 7:56 pm    Post subject: [Delphi] Check for String in ItemBox Reply with quote

Well hello,

I'm wondering if there is a way to check like
Code:
 if 'lol' is on Memo1.Lines = true then ShowMessage('It's on the list') else ShowMessage('It's not on the list')


Or if it's on a ItemBox/Listbox.

Is this possible ?
Back to top
View user's profile Send private message
slippppppppp
Grandmaster Cheater
Reputation: 0

Joined: 08 Aug 2006
Posts: 929

PostPosted: Wed Dec 12, 2007 8:05 pm    Post subject: Reply with quote

im not sure but i think it was something like:
i : integer;

for i := 1
if listbox1.selected[i] = '/string'
then begin

end;

im pretty sure it's like that or somewhere near that Confused
Back to top
View user's profile Send private message AIM Address MSN Messenger
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Wed Dec 12, 2007 8:21 pm    Post subject: Reply with quote

Mhh can't get it to work Sad Thanks anyway.
Back to top
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Wed Dec 12, 2007 8:21 pm    Post subject: Reply with quote

I'm not really sure but it has to do with checking each entry individually.

Btw, there is no component called 'ItemBox.' Are you talking about ListBox or ComboBox?
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Wed Dec 12, 2007 8:23 pm    Post subject: Reply with quote

Yes I mean ListBox Very Happy sorry.

But how will you check each entry ?
Back to top
View user's profile Send private message
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Wed Dec 12, 2007 11:20 pm    Post subject: Reply with quote

Code:
For I :=0 to listbox1.Items.Count -1 do
  If listbox1.Items[i] = 'MyString' then
    showmessage('OMG! MY STRING IS IN IT');
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Thu Dec 13, 2007 4:19 am    Post subject: Reply with quote

Wow thx Smile hehe cookie for you Very Happy

But how can I do the same with a TEdit box?

Like Edit.Text is 'I are cool'
if Edit1.Text = *'are'* then.... // the * as placeholder
Back to top
View user's profile Send private message
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Thu Dec 13, 2007 8:47 am    Post subject: Reply with quote

You can use the Pos function:
Code:
if Pos('are',Edit1.Text)> 0 then
  showmessage('Blah!');

And about my previous code, its check if the hole line is like the string.
If you want to know if the line contain your string use this code:
Code:
For I :=0 to listbox1.Items.Count -1 do
  if Pos('are',listbox1.Items[i])> 0 then
    showmessage('Blah!');
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Thu Dec 13, 2007 12:36 pm    Post subject: Reply with quote

what was so hard about it.. ?
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Thu Dec 13, 2007 6:55 pm    Post subject: Reply with quote

Kaspersky wrote:
what was so hard about it.. ?


I never said it's hard, I just said I've no idea how to do something like this.
And wanna know something? YA? so: I'm really sure you didn't know it as well.
Don't show off with skills which you don't got!
Back to top
View user's profile Send private message
jongwee
Moderator
Reputation: 0

Joined: 28 Jun 2006
Posts: 1388
Location: Singapore

PostPosted: Thu Dec 13, 2007 6:58 pm    Post subject: Reply with quote

Kasper don't be an ass..
_________________
Back to top
View user's profile Send private message MSN Messenger
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Fri Dec 14, 2007 6:01 am    Post subject: Reply with quote

jongwee wrote:
Kasper don't be an ass..
Ya, he just learning...
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Fri Dec 14, 2007 6:10 am    Post subject: Reply with quote

HolyBlah wrote:
jongwee wrote:
Kasper don't be an ass..
Ya, he just learning...


This is basic shit
Back to top
View user's profile Send private message
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Fri Dec 14, 2007 6:12 am    Post subject: Reply with quote

He need to learn somewhere...
Back to top
View user's profile Send private message
ups2000ups
I post too much
Reputation: 0

Joined: 31 Jul 2006
Posts: 2471

PostPosted: Fri Dec 14, 2007 6:43 am    Post subject: Reply with quote

isent it basic programing to know how to get strings from listbox and stuff?
_________________
dont complain about my english...
1*1 = 2?
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
Goto page 1, 2  Next
Page 1 of 2

 
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