I create a custom button, and pasted the code below into the left click box. The code was copied from this forum. However, when I click the button, instead of a message box being displayed, the variables are displayed over the button, like in the screen capture shown below. Not sure what I am doing wrong here. Any suggestions would be appreciated.
$var_file = "<curname>";
$var_User = "%USERNAME%";
$var_DATE = "<date>";
msg " $var_User has selected <crlf 2>$var_file<crlf 2>at $var_DATE";
Commands in custom button are not working
Re: Commands in custom button are not working
Please read
"Advanced Topics - Scripting - Multi-line Scripts and Multi-Scripts"
Your indentation is wrong
"Advanced Topics - Scripting - Multi-line Scripts and Multi-Scripts"
Your indentation is wrong
One of my scripts helped you out? Please donate via Paypal
Re: Commands in custom button are not working
Thank you, that was driving me nuts! So all lines after the first must be indented by at least one space.
One other issue related to the custom buttons, I placed the correctly indented code snippet into the "Test" button shown in the screenshot below. However, I found that after I edited and added the code snippet, I am unable to edit the button again. If I right click on "Test", there is no option to edit it. How can I edit a button which has scrolled off the toolbar like the "Test" button shown in the screenshot?
-Thanks
One other issue related to the custom buttons, I placed the correctly indented code snippet into the "Test" button shown in the screenshot below. However, I found that after I edited and added the code snippet, I am unable to edit the button again. If I right click on "Test", there is no option to edit it. How can I edit a button which has scrolled off the toolbar like the "Test" button shown in the screenshot?
-Thanks
Re: Commands in custom button are not working
Hold Ctrl when you right click it
One of my scripts helped you out? Please donate via Paypal
Re: Commands in custom button are not working
Thanks again!
Despite a few growing pains, I am loving XYPlorer! I just purchased a license last night. I have evaluated several other file managers, and can honestly say XY is the best in it's class! It does everything I want in a file manager, and so much more. Once I become more proficient with scripting, the proverbial sky is the limit!
-Bernie
Despite a few growing pains, I am loving XYPlorer! I just purchased a license last night. I have evaluated several other file managers, and can honestly say XY is the best in it's class! It does everything I want in a file manager, and so much more. Once I become more proficient with scripting, the proverbial sky is the limit!
-Bernie
Re: Commands in custom button are not working
It still does not let me edit the custom button when I hold the Ctrl key. Tried other key combinations as well. I have an HP Envy laptop with trackpad, and I'm using a two finger tap, which is a right click.highend wrote:Hold Ctrl when you right click it
Re: Commands in custom button are not working
Maybe that's because of this "special click" which is translated to a (software) right click through your touchpad software. It does work with real mouse buttons though
One of my scripts helped you out? Please donate via Paypal
Re: Commands in custom button are not working
Control-right click also works on laptops with buttons for left and right clicks. Though I think many of the newer laptops don't have those buttons anymore.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440
Re: Commands in custom button are not working
klownboy wrote:Control-right click also works on laptops with buttons for left and right clicks. Though I think many of the newer laptops don't have those buttons anymore.
Thanks, I got it to work by using Ctrl then tapping one finger, not two.
Re: Commands in custom button are not working
highend wrote:Maybe that's because of this "special click" which is translated to a (software) right click through your touchpad software. It does work with real mouse buttons though
Thanks, I got it to work by holding Ctrl then tapping with one finger, not two.