Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.01.08;
Скачать: CL | DM;

Вниз

Как считать параметры прокраммы в командной строке   Найти похожие ветки 

 
ProfiUgl ©   (2001-12-19 15:24) [0]

доброго дня суток МАСТЕРА!
Может быть кто-нубудь подскажет как считать параметры прокраммы в командной строке. Например я запускаю свое приложение: MyProg.exe -k, требуется в выкусить


 
Юрий Федоров ©   (2001-12-19 15:25) [1]

ParamStr, ParamCount


 
ProfiUgl ©   (2001-12-19 15:40) [2]

Спасибо понял!


 
oomneeq   (2001-12-19 15:45) [3]

А вот эта круче всех! :)

FindCmdLineSwitch

unit
SysUtils


type TSysCharSet = set of Char;

function FindCmdLineSwitch(const Switch: string; SwitchChars: TSysCharSet; IgnoreCase: Boolean): Boolean;

description


Returns True if a specified string was passed as a command line argument.
TSysCharSet is a set containing special characters (e.g., "-" and "/" are common) that can be used to parse a string. The IgnoreCase parameter controls whether a case-sensitive or case-insensitive search is performed.

example


var s : string;
sc: TSysCharSet;

s:="help";
sc:=["/","-","|"];

// executed as: AppName.exe /help

if FindCmdLineSwitch(s,sc,False) then
ShowMessage("Application called with
HELP parameter!");


Источник:
http://delphi.about.com/library/rtl/blrtlFindCmdLineSwitch.htm



Страницы: 1 вся ветка

Текущий архив: 2002.01.08;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.013 c
4-22474
Slym
2001-11-02 11:25
2002.01.08
Не получается сделать Хук... Помогите!


3-21946
set
2001-12-05 00:08
2002.01.08
Ещё раз работа с базами


4-22501
Art
2001-11-02 08:30
2002.01.08
А можно ли запретить использование определенных Api другим приложениям?


3-21922
Стас
2001-11-29 12:50
2002.01.08
BDE


1-22124
abandon
2001-12-18 02:16
2002.01.08
Метки на jpg, bmp ит.д.