Possible set "name" for "on right click" in user buttons?
Possible set "name" for "on right click" in user buttons?
Hi,
When setting user buttons, I could give name for the "on left click" command, which is the default name field.
I also set a command for "on right click", but couldn't find how to name it.
Is it possible set "name" for "on right click" in user buttons?
I recorded my screen showing the issue: https://goo.gl/DU27mi
Thanks for assistance,
Carlos
When setting user buttons, I could give name for the "on left click" command, which is the default name field.
I also set a command for "on right click", but couldn't find how to name it.
Is it possible set "name" for "on right click" in user buttons?
I recorded my screen showing the issue: https://goo.gl/DU27mi
Thanks for assistance,
Carlos
Re: Possible set "name" for "on right click" in user buttons?
You need to specify a caption for your scripts.
So change your click definitions to:
Further you can use the variable version of get('MenuCaption', command_ID, flags) to pull the captions used by XY for these command. This is nice in that it will use the active translation and optionally show the assigned shortcut key:In this case the flags value of 5 means include the keyboard shortcut and show an error message if the specified command ID does not exist.
So change your click definitions to:
Code: Select all
"Paste Image Into New File" #206;
"Paste As Shortcut(s)" #218;
Code: Select all
"<get MenuCaption 206 5>" #206;
"<get MenuCaption 218 5>" #218;
Re: Possible set "name" for "on right click" in user buttons?
Depending on how far or how carried away you want to get for CTBs, you can also achieve a hover tooltip with a return so that you can more clearly see the left click name and the right click name. See what I mean in the example caption below. The problem is you can't accomplish this by modifying the name edit field for the CTB. Unfortunately, you also can't accomplish it by using SC ctbname either. At least I haven't found a way (though it might be nice if we could Don). So you have to edit the XYplorer.ini file directly. Personally though I think it's worth it for those CTBs you have which have actions assigned for both the left and right mouse buttons made and will use forever...well a long time.You can see there's a return and tab (the tab doesn't display here) "¶ " between [L] left and [R] right name assignments...the rest is not important for the desired result. The [L] left name and [R]right name will show up in the name block of the CTB edit box, but you will not see the return and tab. Remember you have to save the ini file when done and exit XY without saving and then restart XYplorer.
So you have to find the listing of CTB assignments in the XYplorer.ini file and modify the CTB name assignments (listed under the header [CustomButtons]) that you desire as follows:Code: Select all
5=""[L] Layout Manager¶ [R] Session Manager|:tabsets|0|0" global $DYN_InpSess = "Normal"; load "SessionManager.xys", "_Load"; load("<xyscripts>\SessionManager.xys");"
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440
Re: Possible set "name" for "on right click" in user buttons?
klownboy wrote:you can also achieve a hover tooltip with a return so that you can more clearly see the left click name and the right click name. [...] Unfortunately, you also can't accomplish it by using SC ctbname either.
Code: Select all
ctbname('LClick caption'.<crlf>.'RClick caption');
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Possible set "name" for "on right click" in user buttons?
Good to see you back here more often Sammay and thanks that did work fine. Though I suppose if one was doing this for a bunch of CTBs for the first time, they might as well modify the ini file. Thanks again.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440
Re: Possible set "name" for "on right click" in user buttons?
Thanks, happy to be in the club with you all. Life's hectic. And that's great.klownboy wrote:Good to see you back here more often Sammay
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Possible set "name" for "on right click" in user buttons?
Thanks for all responses!
Regarding
Regarding
, could you please give more directions on how to modify the ini file?Though I suppose if one was doing this for a bunch of CTBs for the first time, they might as well modify the ini file.
Re: Possible set "name" for "on right click" in user buttons?
Go to the "Tools" menu item and select "Open Configuration file..." It will open the XYplorer.ini file with the designated editor. From there just scroll down or search for [CustomButtons] and you will see the listing of all your CTBs. You'll see that they start with 1=""bla, bla, bla, 2= ""bla, bla bla. So in the very beginning now you can modify the names for Left and Right clicks similar to what I have above. I use [L] name for left click action and [R] name for right click action, but you can do what ever you want. Another example:As I mentioned above you need the return symbol and tab between the left and right name. Good luck and remember what I said above about saving the ini file and then exiting XYplorer without saving and then restarting.
Code: Select all
33=""[L] Configuration¶ [R] List Management
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440
Re: Possible set "name" for "on right click" in user buttons?
Many thanks guys for all information!
So far I was dealing with single commands when "right clickling", and I could acomplish to caption them.
Then I tried to add a script with several commands to be listed when "right clickling". However, the list doesn't appear when I right click. Just a single messed line is appearing. If I click on the "click" option that appears just below this messed line, then the expect list works properly. I'm trying this script:
I also recorded my screen showing the issue in more detail: https://goo.gl/xDFhxJ
Does anyone know if it is possible, when "right clickling" a user button, a list with commands in script be showed?
Thanks!
Carlos
So far I was dealing with single commands when "right clickling", and I could acomplish to caption them.
Then I tried to add a script with several commands to be listed when "right clickling". However, the list doesn't appear when I right click. Just a single messed line is appearing. If I click on the "click" option that appears just below this messed line, then the expect list works properly. I'm trying this script:
Code: Select all
$menus = <<<>>>
Paste;#202;:paste
Paste Text;#219
Paste Shortcut;#218
Paste SymLink;#270
Paste Special...;#210
>>>;
$selected = popupmenu($menus, , , , , , <crlf>);
if ($selected) { load $selected, , "s" }
else { status "No item chosen, aborted!", "8B4513", "stop"; }
Does anyone know if it is possible, when "right clickling" a user button, a list with commands in script be showed?
Thanks!
Carlos
Re: Possible set "name" for "on right click" in user buttons?
Hi cadu, do you have the XYplorer tweak CTBNoRClickDefaultCommands set to "1" as follows:That may be causing your problem because I ran your example script on the right click of a CTB and it ran without issues. Also make sure you have your code lines all indented at least one space. EDIT: Sorry no indents on your heredoc lines.
Code: Select all
CTBNoRClickDefaultCommands=1
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440
Re: Possible set "name" for "on right click" in user buttons?
Code: Select all
CTBNoRClickDefaultCommands=1