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] Press any key to continue...

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Pseudo Xero
I post too much
Reputation: 0

Joined: 16 Feb 2007
Posts: 2607

PostPosted: Mon Mar 03, 2008 3:34 am    Post subject: [Delphi] Press any key to continue... Reply with quote

I'm making a console application, and I want to wait for any input before exiting. How can I do this?
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Mon Mar 03, 2008 4:21 am    Post subject: Reply with quote

declare a global boolean, call it Fuck.

Fuck:Boolean;

use the while loop

Code:
begin
Fuck:=True;

  While Fuck = True do
   begin
   if odd(GetAsyncKeyState(VK_FX)) then {Do w.e you want}
   Fuck:=False;
   end;
end.


Edit: Holy macaroni, i forgot to tell you, the X in VK_FX is a number.

F1 for example..
Back to top
View user's profile Send private message
Pseudo Xero
I post too much
Reputation: 0

Joined: 16 Feb 2007
Posts: 2607

PostPosted: Mon Mar 03, 2008 4:48 am    Post subject: Reply with quote

Rot1 wrote:
declare a global boolean, call it Fuck.

Fuck:Boolean;

use the while loop

Code:
begin
Fuck:=True;

  While Fuck = True do
   begin
   if odd(GetAsyncKeyState(VK_FX)) then {Do w.e you want}
   Fuck:=False;
   end;
end.


Edit: Holy macaroni, i forgot to tell you, the X in VK_FX is a number.

F1 for example..

There isn't any way other than calling GetAsyncKeyState? Razz
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Mon Mar 03, 2008 4:52 am    Post subject: Reply with quote

Xenophobe wrote:
Rot1 wrote:
declare a global boolean, call it Fuck.

Fuck:Boolean;

use the while loop

Code:
begin
Fuck:=True;

  While Fuck = True do
   begin
   if odd(GetAsyncKeyState(VK_FX)) then {Do w.e you want}
   Fuck:=False;
   end;
end.


Edit: Holy macaroni, i forgot to tell you, the X in VK_FX is a number.

F1 for example..

There isn't any way other than calling GetAsyncKeyState? Razz



umm...RegisterHotKey ?

other than those two i don't know, sorry.

Edit: i looked at my earlier code, it wont work.

do this:

Code:
Fuck:=True;

  While Fuck = True do
   if odd(GetAsyncKeyState(VK_FX)) then
    begin
    {Do w.e you want}
    Fuck:=False; //Escaping from the loop here...
   end;
End;
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Mon Mar 03, 2008 8:19 am    Post subject: Reply with quote

Check out this example:
http://www.festra.com/wwwboard/messages/2569.html

They show using readkey after spitting out a message then checking the input:

Code:
begin
   message := 'press any key to continue';
   write(message);
   response := readkey;
   if (response = P) then halt;
   writeln;
   end;

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Mon Mar 03, 2008 9:13 am    Post subject: Reply with quote

well, i don't code much in console (pascal), only in C (still learning) cause i idk how to use UI in MSVC++ 6.0
Back to top
View user's profile Send private message
malfunction
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Jan 2007
Posts: 1015
Location: http://www.behindthecorner.com/

PostPosted: Mon Mar 03, 2008 9:25 am    Post subject: Reply with quote

Rot1 wrote:
well, i don't code much in console (pascal), only in C (still learning) cause i idk how to use UI in MSVC++ 6.0

Explanations, explanations kaspersky Smile
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