Вниз
Скачать: 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 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.01 c
3-21923
Котелок
2001-11-30 02:16
2002.01.08
Отвлечённый вопрос про оптимизацию.


3-21960
Аленка
2001-12-05 12:53
2002.01.08
Помогите пожалуйста!


14-22407
KL
2001-11-03 00:47
2002.01.08
Бета тестинг!!!


14-22344
anod
2001-11-06 13:15
2002.01.08
Крестоики - нолики


3-21914
Axel
2001-12-03 18:05
2002.01.08
Вопрос по MIDAS.




   Наверх