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] Console Application

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

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Sun Nov 25, 2007 3:00 pm    Post subject: [Delphi] Console Application Reply with quote

Hey guys.
Still working on my console application.
Heres a new question:
Is there anyway to make this work in a Console Application?
http://www.swissdelphicenter.ch/torry/showcode.php?id=2177

When I try to run it, it says
"Undeclared identifier 'TStrings'"
"Missing operator or semicolon"
at
Code:
procedure ScanNetworkResources(ResourceType, DisplayType: DWord; List: TStrings);


I want my console apply to show the computers in network by using
Code:
Writeln();
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Sun Nov 25, 2007 3:16 pm    Post subject: Reply with quote

Code:
uses
  SysUtils, Windows, Classes;


But I'm not sure if you can do this in a Console application.
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Sun Nov 25, 2007 3:25 pm    Post subject: Reply with quote

rEakW0n wrote:
Code:
uses
  SysUtils, Windows, Classes;


But I'm not sure if you can do this in a Console application.

Well, I'm not getting the error as before.
But now when Im trying to show the computers in writeln();
Would this be right
Code:
    writeln(ScanNetworkResources(RESOURCETYPE_DISK, RESOURCEDISPLAYTYPE_SERVER, );

Because Im getting an error there.

It says:
Quote:
Not enough actual parameters

I dont know what to add. Any idea?
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: Sun Nov 25, 2007 4:12 pm    Post subject: Reply with quote

Add a TString to it
_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Sun Nov 25, 2007 7:25 pm    Post subject: Reply with quote

It should be TString not TStrings. You can use other units in your console application. Check the procedure header in whatever unit you're getting it from. That should tell you the parameters.
Back to top
View user's profile Send private message
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Mon Nov 26, 2007 7:55 am    Post subject: Reply with quote

add a TStringList variable and use it like this:
Code:

ScanNetworkResources(RESOURCETYPE_DISK, RESOURCEDISPLAYTYPE_SERVER,[My TStrings or TStringList here]);
write([My TStrings or TStringList here]);
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Mon Nov 26, 2007 10:06 am    Post subject: Reply with quote

Could any help me how to add TString to it? Where to put it?
Back to top
View user's profile Send private message
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Mon Nov 26, 2007 10:28 am    Post subject: Reply with quote

Code:
procedure TForm1.Button3Click(Sender: TObject);
var

...
somewhere here
...

begin

...
//code of the procedure here
...

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

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Mon Nov 26, 2007 10:35 am    Post subject: Reply with quote

HolyBlah wrote:
Code:
procedure TForm1.Button3Click(Sender: TObject);
var

...
somewhere here
...

begin

...
//code of the procedure here
...

end;


Remember its not a regular form, its a console application. Razz
But Ill try this out
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 Nov 26, 2007 11:18 am    Post subject: Reply with quote

I've coded alot of shitty quality applications (in the past)
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Mon Nov 26, 2007 11:37 am    Post subject: Reply with quote

Kaspersky wrote:
I've coded alot of shitty quality applications (in the past)

Okay...? And how is that gonna help me -.-
Back to top
View user's profile Send private message
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Mon Nov 26, 2007 12:09 pm    Post subject: Reply with quote

Moller wrote:
HolyBlah wrote:
Code:
procedure TForm1.Button3Click(Sender: TObject);
var

...
somewhere here
...

begin

...
//code of the procedure here
...

end;


Remember its not a regular form, its a console application. Razz
But Ill try this out



Oh,
so put var section before all procedures/functions an after uses and types.

@Kaspersky:
show me 1 good program and i will remove it from my sig.
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 Nov 26, 2007 1:51 pm    Post subject: Reply with quote

HolyBlah:

Here
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Mon Nov 26, 2007 5:20 pm    Post subject: Reply with quote

Kaspersky wrote:
HolyBlah:

Here


Oh look, it can restart the computer and delete the hosts file! I believe an applause is needed here ladies and gentlemen!
Back to top
View user's profile Send private message
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Tue Nov 27, 2007 4:06 am    Post subject: Reply with quote

it just delete files and restart the computer...
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