Add custom commands to context menu ?
-
CookieMonster
Add custom commands to context menu ?
How do you add the ability to right click in XY on a file and a context window displays a custom command and all the options available in the command ?
-
CookieMonster
Re: Add custom commands to context menu ?
Since it is a wish, it can't be done, that is what you're telling me, correct ?
Re: Add custom commands to context menu ?
You can't customize the file context menu, but recently we've been granted the power to completely redesign the context menu that appears when you right click the whitespace/emptyarea of the list. Here's the discussion. (hint: it's a tweak. you have to open XY's ini file, find a key and change it's value)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
CookieMonster
Re: Add custom commands to context menu ?
I don't want to redesign the context menu. I have a command line command that has a few options, I want to have the command as well as the options listed in the context menu, instead of loading a command prompt and triggering the option, I simply select the file, right-click, choose the command, choose an option of the command and run.
-
Stef123
Re: Add custom commands to context menu ?
Well, no hidden messages, actually. Just letting you know I'm all for it, and there's a workaround via Open With that's almost as good. Requires one additional click, though, and you have to remember that "Open With..." actually means "My custom commands", and you cannot have separators unless you call yet another script which then presents your custom menu commands.CookieMonster wrote: Since it is a wish, it can't be done, that is what you're telling me, correct ?
I have it set up this way. It takes 3 clicks to get to my custom context menu, so I use accelerator keys to jump from branch to branch. Not exactly intuitive, but then I get to see my personalized context menu.
Example entry for your PFA:
Code: Select all
|"My &Context Menu" \;*>::load "MyContextMenu.xys"-
CookieMonster
Re: Add custom commands to context menu ?
Stef - You can't do what you mentioned in any folder pane, you have to do a open with.. ? Can I see what you're talking about with screen shots or a short video ? 
-
Stef123
Re: Add custom commands to context menu ?
Exactly. Open with... is your "sesame open", the entry key. Enable it for right-clicks viaCookieMonster wrote:Stef - You can't do what you mentioned in any folder pane, you have to do a open with.. ?
Config > Menus, Mouse, Safety > Files List... > #10
Unless you meant right-clicking an EMPTY spot in the folder pane? Then follow the link Sammay gave you.
-
CookieMonster
Re: Add custom commands to context menu ?
Hi, open with strictly opens the file in which the file has an association; for example, if I select a notepad file, File > Open With.. it will prompt to open notepad. This is a command line program with command line options I want available by right clicking in any pane and accessing, not only the command line, in any pane, but all the options the command line offers.
Stef123 wrote:Exactly. Open with... is your "sesame open", the entry key. Enable it for right-clicks viaCookieMonster wrote:Stef - You can't do what you mentioned in any folder pane, you have to do a open with.. ?
Config > Menus, Mouse, Safety > Files List... > #10
Unless you meant right-clicking an EMPTY spot in the folder pane? Then follow the link Sammay gave you.
-
Stef123
Re: Add custom commands to context menu ?
Not my experience. I can right-click ANY file(s) or folder(s) then pick my custom menu from the Open with menu, then click Copy to other pane, for instance.CookieMonster wrote:Hi, open with strictly opens the file in which the file has an association
If you follow my example above it should work for you, too. Put your commands into a "MyContextMenu.xys" text file that you place inside \Data\Scripts. Then copy my line literally, including the pipe symbol and the backslash etc
Cannot help you with command line stuff. You have to ask a specific question and I am very confident the gurus around here can guide you towards scripting it. You then write this code into your "MyContextMenu.xys" and proceed as described above.CookieMonster wrote: command line options I want available by right clicking
-
CookieMonster
Re: Add custom commands to context menu ?
Right-click a file, followed by "Open with..." ?So after right-clicking a file, first you click on "Open with...", then you click on My Context Menu (or press C)
I understand what you mean, as I'm trying to get your example working; as you mentioned it is a few too many clicks
-
Stef123
Re: Add custom commands to context menu ?
Yes, not an elegant workaround. It were nicer to see custom entries on the first click.
Also not logical
, to have your context menu as part of Open with..... - it should be the other way round. Or at least side by side, so you can place custom calls next to Open with ...
Also not logical
-
CookieMonster
Re: Add custom commands to context menu ?
What other way around; I duplicated what you said to do !
Also not logical, to have your context menu as part of Open with..... - it should be the other way round. Or at least side by side, so you can place custom calls next to Open with ...
-
Stef123
Re: Add custom commands to context menu ?
Just saying I support your original wish. You said our workaround requires "too many clicks". And I added it also turns things "around" - by bringing up the context menu under "Open with..." - instead of calling "Open with..." #176 from our context menu. 
XYplorer Beta Club