Page 1 of 1

Quick toggle of certain setting

Posted: 14 Apr 2025 18:51
by likwidsix
Hello,

I'm looking for a very quick and efficient way to turn on/off the following setting:

Tools->Config->Shell Integration->"XYplorer is the default file manager"

Is there a way to create a keyboard shortcut to toggle this on/off?

Re: Quick toggle of certain setting

Posted: 14 Apr 2025 19:12
by highend

Code: Select all

sendkeys "{PGDN}{UP}{TAB 3} {ENTER}";
    #600;

Re: Quick toggle of certain setting

Posted: 15 Apr 2025 08:21
by altoclef
highend wrote: 14 Apr 2025 19:12

Code: Select all

sendkeys "{PGDN}{UP}{TAB 3} {ENTER}";
    #600;
This confused me a lot! :veryconfused:

I know about sendkeys and that #600 is the command ID to open the Configuration dialog. What I did not understand is why you send the keys first and then open the dialog. I tried it and it works, but I did not understand how.

Eventually I found Microsoft: Application.SendKeys which says (emphasis mine)
This method places keystrokes in a key buffer. In some cases, you must call this method before you call the method that will use the keystrokes. For example, to send a password to a dialog box, you must call the SendKeys method before you display the dialog box.
I still do not understand how Windows works under the hood, but this quote does explain your ordering of the code. :)

Re: Quick toggle of certain setting

Posted: 15 Apr 2025 08:27
by altoclef
highend wrote: 14 Apr 2025 19:12

Code: Select all

sendkeys "{PGDN}{UP}{TAB 3} {ENTER}";
    #600;
For completeness, this depends on the "XYplorer in shell context menu" option being checked first, as otherwise the "XYplorer is default file manager" option is greyed out.