Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Start application with paramstring - question

4 views
Skip to first unread message

Bert Prins

unread,
Oct 24, 2003, 2:01:53 AM10/24/03
to
Hello.

I have an filetype associated with my application, so the user can dblclick
on the file. The application read the filename with ParamStr[1]. But this
don't work with files in maps with a whitespace in it, like '\Program
Files'. ParamStr[1] is the text before the (first) whitespace. How can I fix
this?

Bert Prins


Martin Strand

unread,
Oct 24, 2003, 2:03:21 AM10/24/03
to

"Bert Prins" <prin...@hotmail.com> wrote in message
news:3f98c051$0$58698$e4fe...@news.xs4all.nl...

"C:\Program Files\And\So\On"

Martin
>
>


J French

unread,
Oct 24, 2003, 5:33:17 AM10/24/03
to

Did you set up the File Association yourself ?

The registry entry under your App type should look like:

c:path\apppathh\app.exe "%1"

The double quotes ( Chr(34) ) are then put round the name of the file
that is sent in the command line

Have a look in the registry under
HKEY_CLASSES_ROOT\WinZip\shell\open\command

You can also get at it from: Control Panel/View/Options/File Types

Also you can get the entire command line directly instead of using the
ParamStr() function

procedure TForm1.Button1Click(Sender: TObject);
Var
S :String;
Begin
S := String( GetCommandLine );
ShowMessage( S );

End;


Maynard Philbrook

unread,
Oct 24, 2003, 11:27:24 AM10/24/03
to
Use the CMDLINE variable and parse the line your self..
you will get the complete line that way


Bert Prins wrote:

--
To See what real programmers do in their spare time visit
http://jamie12.home.mindspring.com
home of PC bit software ..
Please send comments about my work .


0 new messages