xplorer2 HACK : Convert any menu item to a toolbar button !!

A collection of especially useful xplorer² topics and ideas. New users may find it helpful to look here before searching the other forums for information. >>>>>> Please post new material in the relevant forum. (New stuff posted here will be removed.) Thanks. -fg-

Moderators: fgagnon, nikos

Post Reply
maxand
Member
Member
Posts: 38
Joined: 2012 Mar 22, 12:27

Post by maxand » 2012 Apr 04, 08:12

Thanks, fgagnon, very useful tip. I have done that.

User avatar
PhilipSutton
Member
Member
Posts: 31
Joined: 2002 Mar 06, 01:31
Location: Australia
Contact:

Menuhack for function in panel right-click: on blank space

Post by PhilipSutton » 2013 Apr 05, 08:58

I've created a user command button using Menuhack.  Works perfectly. So far, so good.

I notice that there is now a function for creating customised user commands for the right-click context menu PROVIDED the mouse is clicked over a file or folder.  This function doesn't operate if the mouse is over blank space.

What I want to do is create a user command as a shortcut for the:

> Explorer > New right click menu path (over blank space) to that I can quickly insert a new formatted blank file using one of the Windows Explorer templates.

Is there any way that this could be done?

Could the right-click menu function in the main program be modified so that the:
> Explorer2
function shows up in the right click menu when the mouse is over blank space in a pane?

And then how would I find the code to use with Menuhack to open the New files menu?  I've looked in appendix 9D and it seems like the code for this mouse action wasn't included?
Philip Sutton
Australia
http://www.green-innovations.asn.au/

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Menuhack for function in panel right-click: on blank spa

Post by Kilmatead » 2013 Apr 05, 21:49

PhilipSutton wrote:I've looked in appendix 9D and it seems like the code for this mouse action wasn't included?
The "New File" context menu is part of the shell itself and is neither handled nor generated by x2 - so there can be no shortcut for it.  Effectively, this is one of the reasons the "> Explorer" submenu is included when right-clicking the whitespace of folder backgrounds - that in itself is the shortcut - by trying to create a direct link to it, you would only really be "skipping" a single submenu and the quarter-second "hover" time necessary to open the tertiary menu, so not much is gained. :shrug:

As shown here these so-called "templates" of Windows are not actually real at all... invoking a filetype from that menu is exactly the same as hitting <F7> (Actions -> New File) in x2, and giving the generated file any extension just by typing it.  This may be facilitated by going to Tools -> Advanced Options -> Layout Settings [Tab] and setting the New File Extension entry to a single "." character.  Thus, when you hit <F7> the new file created will have no extension by default, allowing you to type in whatever you may want; for example, adding ".docx" will simply create a blank MS Word document as expected.

(Note: there are some exceptions to this rule - certain proprietary filetypes such as ".rar" do actually require proper templates and simply creating a file with the rar extension does not actually create a usable substantive archive... but such things are the exception, rather than the rule - in much the same way as you can't just rename a file as ".exe" and expect it to do anything.  For those interested, RAR's are generated by copying an empty binary header file which is included in the WinRAR installation folder itself, called "rarnew.dat", and renaming it as "rar" or "zip".  However, the vast majority of associated filetypes in the shell do not require this sort of specialised handling - I brought it up as only an example of rare-occurrence, no pun intended. :wink:)

I realise this is not the answer you were looking for, but I hope it makes some kind of sense.  Technically speaking, were you to find yourself with too much time on your hands, it would be possible to create a script to generate a menu which allows this selection by reading the registry and culling the necessary information - but the work involved would not be worth so little gain for something so simple.

User avatar
PhilipSutton
Member
Member
Posts: 31
Joined: 2002 Mar 06, 01:31
Location: Australia
Contact:

Re: Menuhack for function in panel right-click: on blank spa

Post by PhilipSutton » 2013 Apr 09, 13:05

Kilmatead wrote:by trying to create a direct link to it, you would only really be "skipping" a single submenu and the quarter-second "hover" time necessary to open the tertiary menu
It's a bit more than a ¼ second on my machine and I find the extra time slightly annoying.

The "Explorer" submenu elements could perhaps be raised one level in the x2 menu hierarchy and not have them grouped under 'Explorer' menu heading?

I have tried using the x2 'New File' function to create Word files - but when they are opened they are not formatted using the Normal.dot formatting template.  They are formatted with plain Courier 10 which is not what I want.  Using the >Explorer>New menu function I get correctly formatted Word docs.

Cheers, Philip
Philip Sutton
Australia
http://www.green-innovations.asn.au/

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Menuhack for function in panel right-click: on blank spa

Post by Kilmatead » 2013 Apr 09, 15:03

PhilipSutton wrote:It's a bit more than a ¼ second on my machine and I find the extra time slightly annoying.
I was actually exaggerating that approximation, so perhaps your hover time is longer for some reason.  :shrug:

For what it's worth, you can use keyboard accelerators with the context menu which will bypass the hover-delay, so once the menu is open, just press 'X' then 'W' which is significantly faster.

Theoretically this could be automated using scripting languages like AutoIt or AutoHotKey - but that would require some means of "knowing" where the whitespace was in the pane in the first place to automate/force a Right-Click without user-intervention - and I'm uncertain how to achieve that since even Windows Explorer treats the menus differently whether you click on files or whitespace.  I did search for a means via the Windows API to see if it was possible to open the "new" submenu via the shell directly, but I found no joy there either.

So, lacking a better solution, keyboard accelerators are the quickest means to the end, for now.

jdwebb2
New Member
Posts: 7
Joined: 2014 Apr 04, 16:16

Re: xplorer2 HACK : Convert any menu item to a toolbar butto

Post by jdwebb2 » 2014 Apr 04, 16:32

re: using xplorer2 HACK to make a toolbar icon do a keyboard shortcut

I was wondering if there was a hotkey ID for CTRL+D+D (or CTRL+D, CTRL+D)
I am aware of ID: 32915 for Ctrl+D and I have made a toolbar icon so I can get folder sizes in the Right-hand pane. But (obviously) the icon needs to be clicked twice to get the CTRL+D+D to work.

Any work-arounds for this one?

Many thanks for any advice

Regards
John.

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: xplorer2 HACK : Convert any menu item to a toolbar butto

Post by Kilmatead » 2014 Apr 04, 18:05

jdwebb2 wrote:Any work-arounds for this one?
There are some things in this life which call for finesse - marriage proposals, funeral orations, and dealing with queue-jumpers whilst maintaining a civilised mien.

And then there are some things that just require the emotionless dissociation of a psychopath - blunt-force-trauma, bar-brawling, and dealing with queue-jumpers without maintaining a civilised mien.

This case falls into the latter camp for simplicity... when in doubt, just write a specialised script to send <Ctrl+D> twice and be done with it: SizesFromRoot. Extract it, make a dedicated toolbar button for it (no parameters necessary), and then roam the streets looking for trouble with the sound of the low spark of the high-heeled boys ringing in your ear. :wink:

jdwebb2
New Member
Posts: 7
Joined: 2014 Apr 04, 16:16

Re: xplorer2 HACK : Convert any menu item to a toolbar butto

Post by jdwebb2 » 2014 Apr 04, 18:22

Oh! mine poet of the bits and bytes, you have made this old plodder a very happy little man.

Many, many thanks.

jdwebb2
New Member
Posts: 7
Joined: 2014 Apr 04, 16:16

Re: xplorer2 HACK : Convert any menu item to a toolbar butto

Post by jdwebb2 » 2014 Apr 04, 18:51

Actually I never thought to see the words simplicity and specialized in the same sentence. Must be something in the magic waters of Dublin, And, yes, my wife's name is indeed Virginia!

Thanks again my friend.

wingood
Member
Member
Posts: 11
Joined: 2016 Apr 07, 09:39

extensions?! or just options.. maybe hacks... clever xplore

Post by wingood » 2016 Apr 20, 17:32

I popped in here, just to glance and see if there was anything on, erm... oh yeah! "property inspectors"... But this sounds too good to miss.

My interest my piqued at scrap mgmt, almost missed the thread title... wondering if there's anything anywhere for embedding (ideally multi-tab, perhaps in it's own pane) all those floating scraps I'd otherwise be using (i've got an 'embedded' fetish this week)

totally thread hijacking (will repost if reprimanded, but reckon someone like kilmatead might 'know' ( or write?! and ooh SizesfromRoot?! IAMSPOILT) but wondered how xplorer2's 'details pane' property inspector fares... I've just noticed Explorer's isn't just read-only, but the fields (size... date mod...) seem set

Image

Is this something that is present in xplorer? (sorry for being a total noob)

Many thanks!

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: xplorer2 HACK : Convert any menu item to a toolbar butto

Post by Kilmatead » 2016 Apr 20, 18:30

The x2 details pane (View -> Details Pane) is not only interactive, but customisable. And, as of the last update, edit-enabled. Using it to its full extent (beyond the default) will require some effort on your part, however, as I'm not that kind of girl. :wink:

pj
Gold Member
Gold Member
Posts: 392
Joined: 2006 Jan 26, 14:01
Location: Florida

Re: xplorer2 HACK : Convert any menu item to a toolbar butto

Post by pj » 2016 Apr 21, 12:33

Kilmatead wrote:... however, as I'm not that kind of girl. :wink:
I thought we were just haggling over price?

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: xplorer2 HACK : Convert any menu item to a toolbar butto

Post by Kilmatead » 2016 Apr 21, 12:50

Considering the bag of fool's gold you left on the coffee-table last time felt a few shillings short of a quid, you're on the exchequer's watchlist, Señor.

pj
Gold Member
Gold Member
Posts: 392
Joined: 2006 Jan 26, 14:01
Location: Florida

Re: xplorer2 HACK : Convert any menu item to a toolbar butto

Post by pj » 2016 Apr 21, 19:50

Kilmatead wrote:Considering the bag of fool's gold you left on the coffee-table last time felt a few shillings short of a quid, you're on the exchequer's watchlist, Señor.
But where else would I leave my Fool's Gold?

wingood
Member
Member
Posts: 11
Joined: 2016 Apr 07, 09:39

Re: xplorer2 HACK : Convert any menu item to a toolbar butto

Post by wingood » 2016 Apr 23, 19:10

Kilmatead wrote:The x2 details pane (View -> Details Pane) is not only interactive, but customisable. And, as of the last update, edit-enabled. Using it to its full extent (beyond the default) will require some effort on your part, however, as I'm not that kind of girl. :wink:
WOW. More options! :party: Thank you so much for the insights!
Ok :?: time
In the example the number s_3 means the stock extension column that is represented by number 3.
Image

ok, so 's'tock starts from 1, explorer's start from 0...
on my system the Owner property would be column e_11
starting from 0, after the [s]tock entries, mine's 10 (in the list, will test)
Image

so it depends on the order, and the current order... so it's worth trying to get it working (this could be so handy, assuming it works on groups... any integration with filemeta?
A more robust method is to use the system property identifiers instead of column numbers. For example the owner column corresponding to System.FileOwner property would be declared as e_{9B174B34-40FF-11D2-A27E-00C04FC30871}:4
Assuming they're just CLSIDs..
Any idea what the ':4' is for?!
Any rules, re which types can be ref'd ?
Image

Post Reply