[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] [OT]: droplets for Win32 ?



At 11:10 AM +0200 1999/7/9, Torsten Mohrbach wrote:
>sorry for asking a Win-related question in this newsgroup - but
>hopefully some of you have already encountered this problem during
>portability work:
>
>i have a neat little script doing some analysis with a whole bunch of
>files. on the mac i used a droplet. now the user who i wrote this for
>wants to move to win32 (...). is there a similar mechanism to do that ?
>
>(i know i could also try the globbing-module w/ the DOS-command-line but
>actually i'm looking for an exact copy of the mac-mechanism!!)
>
>thanks for your time!
>
>torsten

There is no special mechanism for droplets in win32.  to be able to drop on
.pl script you have to associate the .pl extension with perl (if you've
installed using ActiveState's installer this may already be done), then you
have to make sure your getting all the files dropped, not just the first.

In windows nt (i forget how to do this in win95) goto the command line and
type (this is all from memory as I'm on my mac at the moment):
ftype | find /i "perl"

this will list the file type that is associated with the perl command line.
It should look something like:
PerlScript=[path]\perl.exe "%1" "%*"

Where PerlScript is the file type name, [path] is the path to your perl
executable "%1" is the first command line option, "%*" is all the remaining
(I forget why they get broken up this way).  If the "" aren't around the %1
and %* then scripts in paths with spaces in them will not work.

Next make sure the .pl extension is mapped to the PerlScript filetype:
assoc | find /i ".pl"

this will display the mapping of .pl to a file type.  It should be:
.pl=PerlScript

You can use the ftype and assoc commands to change the various settings also.

Finally, on Win95/98 I think you have to do the same things thru the file
type mappings (in an explorer window goto View...Options click on the File
Types tab).


Once this is done you can drop a selection of files on a perl script and
the filenames should get passed to perl via the commandline.


Kevin

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org