Solved

Get Command Line Options

Posted on 2000-04-01
2
137 Views
Last Modified: 2010-04-04
How could I get commandline options for example if I was to run my program like this

project.exe /a /s

how could I get the /a and /s?
0
Comment
Question by:nafa2221
  • 2
2 Comments
 
LVL 7

Expert Comment

by:Motaz
ID: 2677324
ParamStr(1) and ParamStr(2)

If you want to know the number of passed parameters use ParamCount

Azzoz
0
 
LVL 7

Accepted Solution

by:
Motaz earned 50 total points
ID: 2677329
If you want to display all parameters in a memo do this:

- Drop a Memo
- Drop a Button and write this code in it's OnClick event:

var
  i: Integer;
begin
  Memo1.Clear;
  for i:= 1 to ParamCount do
   Memo1.Lines.Add(ParamStr(i));
end;

Motaz
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now