Mail Archives: djgpp/2008/06/22/07:31:29
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f
|
NNTP-Posting-Date: | Sun, 22 Jun 2008 06:29:29 -0500
|
From: | "MikeC" <Mike DOT Best AT btconnect DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Accepting files (question)
|
Date: | Sun, 22 Jun 2008 12:29:29 +0100
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 6.00.2900.5512
|
X-RFC2646: | Format=Flowed; Original
|
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2900.5512
|
Message-ID: | <po-dnT-Z46oEqsPVRVnyjAA@bt.com>
|
Lines: | 54
|
X-Usenet-Provider: | http://www.giganews.com
|
X-AuthenticatedUsername: | NoAuthUser
|
X-Trace: | sv3-IAousFFDq8bd9VWYdchIIQxdkzBEAYUqgvawBesWiBENUH63j5hm/M5TSqFljuyafOKXnJjjPUX0QoU!2TaExYEeLxW4uQLCoyJX+OHxw2Vs1LkY7iuzCinZIfJNGRoNCEyefHrRTa4rMmFF
|
X-Complaints-To: | abuse AT btinternet DOT com
|
X-DMCA-Complaints-To: | abuse AT btinternet DOT com
|
X-Abuse-and-DMCA-Info: | Please be sure to forward a copy of ALL headers
|
X-Abuse-and-DMCA-Info: | Otherwise we will be unable to process your complaint properly
|
X-Postfilter: | 1.3.39
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Good Folk,
I have written a parser program that operates on one or more files to
produce an output file. It takes an input file, parses it (with the help of
other files if they are given) and produces an output file.
The way I operate the program under Windows XP is to make a shortcut icon to
my program on the task bar, then I select the input file(s) with Wndows
Explorer, drag it (or them symoltaneously) onto the shortcut icon, and drop
them. The filenames are passed exactly as if I had typed them all on the
command line...
myparser d:\path_1\file_1 d:\path_2\file_2
... and the filenames are placed in argv[n]. No problems there - it works
fine.
I have used the same technique on several other programs too. It's a nice
way of operating a DOS program from Windows.
I want to write a simple file encryption program that uses a one-time pad.
This technique is very secure, as long as nobody gets hold of the key - and
therein lies the snag. I want to use another file on the PC as a key, but I
don't want to say "Input key ... Browse", as that makes it obvious that it
is on the PC somewhere. What I want to do is drop the document to be
encrypted on the program's shortcut icon to fire it up, then have it wait
till a second file (the key) is dropped on it, and have it detect and use
that second file. I have played around with it a bit, but dropping a second
file on the icon just starts a second image of my program, and while
dropping the file into the DOS screen gives the right Windows indications (a
'+' copy icon), I can't detect the file name. Can anybody shed some light
on this please?
I have recently downloaded Notepad++, and I can't sing its praises highly
enough. It's a terrific piece of work - and the comparison plugin has saved
me a lot of time already and made me look impressive in the eyes of my
colleagues - but what I wanted to say is that it operates in the way I said.
Drop a text file on it, and it starts up and displays the text. Drop a
second one on it while it is running, and it opens a new tab and displays
the second file. Admittedly, it is compiled by a compiler that is made for
Windows, not one that is made for DOS, but I'm sure DJGPP has a way, if
somebody can tell me.
Thanks very much,
MikeC
--
Mental decryption required to bamboozle spam robots:
mijewen$btconnect*com
$ = @
* = dot
- Raw text -