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 


Pause in delphi?

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

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sat Dec 08, 2007 6:52 pm    Post subject: Pause in delphi? Reply with quote

How do you do the pause thing in Delphi council application?

for batch you use : pause
for C++ you use : system('PAUSE');
Back to top
View user's profile Send private message
newb09
Master Cheater
Reputation: 0

Joined: 02 Feb 2007
Posts: 350

PostPosted: Sat Dec 08, 2007 6:59 pm    Post subject: Reply with quote

use sleep
_________________
NOOBXOR = Comes from the root words noob and haxor, hence noobxor.
word created by: newb09 & ferenzo
Back to top
View user's profile Send private message AIM Address
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sat Dec 08, 2007 7:04 pm    Post subject: Reply with quote

no i ment using so that you hit any key then it cotinues.
Back to top
View user's profile Send private message
newb09
Master Cheater
Reputation: 0

Joined: 02 Feb 2007
Posts: 350

PostPosted: Sat Dec 08, 2007 7:06 pm    Post subject: Reply with quote

oh um... i know how but i want u to help me with my code plz. lol hold on let me look at the one i made in delphi. ill post how in just a sec.
_________________
NOOBXOR = Comes from the root words noob and haxor, hence noobxor.
word created by: newb09 & ferenzo
Back to top
View user's profile Send private message AIM Address
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sat Dec 08, 2007 7:08 pm    Post subject: Reply with quote

jsut use that for(;Wink look and if the handle isn't 0 then break the loop. Like I showed u in the PM. BTW. its at the bottom...
Back to top
View user's profile Send private message
newb09
Master Cheater
Reputation: 0

Joined: 02 Feb 2007
Posts: 350

PostPosted: Sat Dec 08, 2007 7:13 pm    Post subject: Reply with quote

try the onkeypress event actually. it should work idk i dont have delphi now i uninstalled it Smile
_________________
NOOBXOR = Comes from the root words noob and haxor, hence noobxor.
word created by: newb09 & ferenzo
Back to top
View user's profile Send private message AIM Address
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sat Dec 08, 2007 7:36 pm    Post subject: Reply with quote

Code:

program SysPause;

{$APPTYPE CONSOLE}

uses
  SysUtils, Windows;

function PauseConsole(Prompt: PAnsiChar): boolean;
var
  hStdIn, hStdOut: THandle;
  dwRd, dwWr, i: Cardinal;
  cBuf: array [0..128] of TInputRecord;
begin
  result := false;
  hStdIn := GetStdHandle(STD_INPUT_HANDLE);
  hStdOut := GetStdHandle(STD_OUTPUT_HANDLE);
  if ((hStdIn <> 0) and (hStdOut <> 0)) then
  begin
     WriteFile(hStdOut, Prompt[0], lstrlen(Prompt), dwWr, nil);
     while ReadConsoleInput(hStdIn, cBuf[0], 128, dwRd) do
     begin
       for i := 0 to dwRd do
       begin
         if ((cBuf[i].EventType = KEY_EVENT) and (cBuf[i].Event.KeyEvent.bKeyDown)) then
         begin
           result := true;
           exit;
         end;
       end;
     end;
  end;
end;

begin
  try
    PauseConsole('Press a key to continue.');
  except
    on E:Exception do
      Writeln(E.Classname, ': ', E.Message);
  end;
end.

_________________
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sat Dec 08, 2007 8:11 pm    Post subject: Reply with quote

thanks?
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: Sat Dec 08, 2007 10:09 pm    Post subject: Re: Pause in delphi? Reply with quote

dnsi0 wrote:
How do you do the pause thing in Delphi council application?

for batch you use : pause
for C++ you use : system('PAUSE');


Just a suggestion do not use system("PAUSE"), it is a waste of resources and is very poorly designed.

Instead either use:

Code:
_getch();


Or

Code:
cin.get();
cin.sync();

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
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