> -----Original Message-----
> From: Jack D. [mailto:[EMAIL PROTECTED] 
> Sent: May 30, 2005 11:57 PM
> To: 'perl-win32-users mailing list'
> Subject: RE: drag'n'drop onto desktop icon ???
> 
>  
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] 
> On Behalf 
> > Of Glenn Linderman
> > Sent: May 30, 2005 3:08 PM
> > To: Ken Cornetet
> > Cc: perl-win32-users mailing list; Michael D Schleif
> > Subject: Re: drag'n'drop onto desktop icon ???
> 
> [snip]
> 
> > Jack's solution may be best of all, but it gets into magic 
> hex strings 
> > and object IDs, which most people don't understand.  And although I 
> > don't know for sure what he means by "any icon with the .pl 
> > extension", since icons have .ico extensions, I'm guessing 
> that what 
> > he means is that any file with the .pl extension, displayed 
> in Windows 
> > Explorer as an icon in a file listing, can then be dropped to.
> 
> I don't profess to understand it either :-) (if I did - I 
> would definitely be in the wrong profession)
> 
> I'll probably screw up this explanation too - but here goes.
> A desktop icon is linked to either a file/program/folder or a 
> shortcut to a file/program/folder. So if we assume that the 
> .pl extension is linked to perl.exe - and the file/program 
> that the icon *represents* has a .pl extension, then any 
> files dropped onto this icon will have their associated full 
> pathnames available in @ARGV of the associated perl script.
> 
> The class ID I used is the .exe drop handler which is somehow 
> linked magically to shell32.dll. The same handler is used for 
> the following
> classes:
> 
> - batfile, cmdfile, comfile, exefile, piffile, scrfile, shcmdfile
> 
> All my script did was to add it to the perlfile class too. 
> Bills solution effectively does the same thing but through 
> the batfile class.
> 
> Of course Glenn is correct that with this new handler, a perl 
> program within a file/folder listing in windows explorer will 
> also accept a drop. This makes sense as the "desktop" is just 
> a folder itself ..
> 
> J.

Oops - I forgot - one last thing. Indeed it *is* the short names which are
dropped.

Put this script in a file on your desktop and drop stuff to see the
arguments.
###################
use Tk;
my $mw=tkinit;
my $t=$mw->Scrolled('Text')->pack;
$t->insert('end',"$_\n") for (@ARGV);
$t->see('end')
MainLoop;
###################

J.
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to