Windows Explorer Context Menu
R.Marquez
ny_r_marquez at yahoo.com
Wed Dec 18 16:42:27 EST 2002
Ok, so there might be a way (albeit, not for the faint of heart).
The one example code I was able to get a hold of, for the Shell
extension, was from 7-zip (http://www.7-zip.org/). Looking around the
source I saw the Explorer shell code. However, it seems to do what I
want by using some MSVC++ header files, which I do not have (and
probably would not know what to do with any way). So, for now, I am
going to have to settle with a workaround (right click on the folder,
send it to the util(s) and get a file open dialog box, instead of
selecting the files straight from Explorer).
However, I decided to post this as a pointer in case someone, with
more experience, know-how, and resources, is interested in pursuing
this a little further. Maybe someone will come up with a nice
"Pythonic" way of adding Explorer Shell Extensions, and share the
wealth with the rest of us.
In any case, thank you very much for your responses.
-Ruben
Dave Brueck <dave at pythonapocrypha.com> wrote in message news:<mailman.1040054131.10964.python-list at python.org>...
> On 16 Dec 2002, Syver Enstad wrote:
>
> > ny_r_marquez at yahoo.com (R.Marquez) writes:
> >
> > > Thanks for the reply. However, what I need is a way to pass _all_
> > > selected items from Windows Explorer to my program, not just one. It
> > > seems that there is no easy way to do this. Think of how, for
> > > example, Winzip dos it. You select all the files you want it to
> > > archive, right click, select the Winzip option, and it does it. This
> > > tells me that it is doable, but can it be done with Python? If so,
> > > how?
> >
> > This involves shell programming and as far as I know you can't make an
> > all python solution at this time. Get yourself a book on shell
> > programming f.eks. from Wrox, and see how you can do it with C/C++. I
> > know that win32all has some support for shell programming but I don't
> > think it is enough to write a shell extension.
>
> Another approach is to use Thomas Heller's ctypes module - once you figure
> out which Windows APIs to call then you might be able to do it from Python
> with ctypes.
>
> -Dave
More information about the Python-list
mailing list