?
Solved

Get Command Line Options

Posted on 2000-04-01
2
Medium Priority
?
151 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 200 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month12 days, 23 hours left to enroll

777 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