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 


Window Detection for delphi? 2 other questions also...

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Kalookakoo
Expert Cheater
Reputation: 0

Joined: 03 Mar 2008
Posts: 117

PostPosted: Tue Aug 12, 2008 7:46 pm    Post subject: Window Detection for delphi? 2 other questions also... Reply with quote

How do you make an application detect a window open and do whatever function I specify.


And also, is it possible to get the black box to appear and text to appear as if I were writing in C++ without an interface? (The cmd box)


And how exactly do I write a code so that when a user clicks/writes something, that window closes and calls a new one up?
Back to top
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Tue Aug 12, 2008 7:55 pm    Post subject: Reply with quote

1. FindWindow ();
2. WHAT?
3. WHAT?

Please be more specific.
Back to top
View user's profile Send private message Send e-mail
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Tue Aug 12, 2008 8:13 pm    Post subject: Reply with quote

He's saying is there anyway for him to create a CUI (Console User Interface) in delphi and is there any way for him to make a command that closes that console and opens up another.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Tue Aug 12, 2008 8:23 pm    Post subject: Reply with quote

oib111 wrote:
He's saying is there anyway for him to create a CUI (Console User Interface) in delphi and is there any way for him to make a command that closes that console and opens up another.


I program in C++...

but try

system ();
Back to top
View user's profile Send private message Send e-mail
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Tue Aug 12, 2008 9:30 pm    Post subject: Reply with quote

AllocConsole();

Quote:
And how exactly do I write a code so that when a user clicks/writes something, that window closes and calls a new one up?


Uhh... Constantly read the buffer, if anything is found, FreeConsole and AllocConsole again?

_________________
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Tue Aug 12, 2008 11:20 pm    Post subject: Reply with quote

Delphi has got a built in console application.
Go to File -> New -> Other... -> Console Application.
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Wed Aug 13, 2008 2:11 am    Post subject: Reply with quote

Quote:
How do you make an application detect a window open and do whatever function I specify.

To detect a window:
- FindWindow

If you want to call an in-game function:
- GetWindowThreadProcessId
- OpenProcess
- WriteProcessMemory to write your hooks or inject your DLL

If you plan on injecting a DLL you will also need to use a few other APIs (well strictly you can do it with just those above actually).


Quote:
And also, is it possible to get the black box to appear and text to appear as if I were writing in C++ without an interface? (The cmd box)

AllocConsole to make the "black box" appear and FreeConsole to get rid of it properly.
And how exactly do I write a code so that when a user clicks/writes something, that window closes and calls a new one up?
Simple IO and string comparisons. Let the user enter input and read it (an easy way is ReadFile) although I'm sure Delphi actually has a built in function for reading a string to a buffer.

Anyway that is more beginner's stuff. To make it close the old console (make sure you saved a handle to it in a variable when you created it since you will need it to close it again) just call FreeConsole.

@Moller : Better to use AllocConsole/FreeConsole if he wants to keep opening and closing different consoles
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