Quick toggle of certain setting

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
likwidsix
Posts: 14
Joined: 27 Mar 2010 20:21

Quick toggle of certain setting

Post 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?

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Quick toggle of certain setting

Post by highend »

Code: Select all

sendkeys "{PGDN}{UP}{TAB 3} {ENTER}";
    #600;
One of my scripts helped you out? Please donate via Paypal

altoclef
Posts: 87
Joined: 12 Oct 2012 18:54
Location: Win10 @100%

Re: Quick toggle of certain setting

Post 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. :)

altoclef
Posts: 87
Joined: 12 Oct 2012 18:54
Location: Win10 @100%

Re: Quick toggle of certain setting

Post 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.

Post Reply