Autohotkey v2 scriptlets to control XYplorer defined Managed Commands from Autohotkey

Discuss other useful utilities, general computing tips & tricks, Internet resources, etc.
JPMuir
Posts: 26
Joined: 06 Mar 2022, 07:31

Autohotkey v2 scriptlets to control XYplorer defined Managed Commands from Autohotkey

20 Sep 2023, 18:16

I use Autohotkey extensively on my desktop. I also use XYplorer constantly for file work, downloads, document storage, and of course containing Autohotkey scripts. Not much notation here on XYplorer, but I thought I might share two simple hotkeys that work to change tabsets in XYPlorer using a commandline hotekey in version 2. In this case, I wanted to have an almost instant change in the XYplorer interface to an AHK related Tab Set (script folders, both v2 and v1, programs, help, etc. and I was wanting to learn about how to use hotekeys in v2. Note, I still haven't got a command of isolating the keystrokes to XYplorer but I was happy to get the the hotkeys to interact with XYPlorer directly to set the Tabset view with the least amount of program fluff.

Note, I am using Managed Command functionality as #1420, #1421 which effectively set the view Tab to a set of folders I've defined as "Default" vs "AHK" related. These are Version 2 hotkey settings.

I defined the Autohotkey hotkey specifically to access the folders pertinent to design of Autohotkey scripts in both v1 and v2.
I also have a hotkey menu which provides quick access to Autohotkey tools.
Image

In XYplorer, I defined #1420 as tabset("load", "Default Downloads")
In XYplorer, I defined #1421 as tabset("load", "TabsetAHK");

I also need to learn how to 'conditionally' use the hotkeys when only XYplorer is open and I found the documentation too confusing to figure out #hotkeyif and hotkeyif and the samples incomplete explaining how that all works.

Code: Select all

#Requires AutoHotkey v2.0

^!Numpad7::
{   ; xyPlorer Tabset: Default, also opens if it is not active. Command #1420 defined as tabset("load", "Default Downloads");
    run "C:\Program Files (x86)\XYplorer\XYplorer.exe /script=::#1420;"
}

^!Numpad8::
{   ; xyPlorer Tabset: ahk, also opens if it is not active. Command #1421 defined as tabset("load", "TabsetAHK");
    run "C:\Program Files (x86)\XYplorer\XYplorer.exe /script=::#1421;"
}

I spent some time designing a popup menu including Autohotkey menu selections for my ease in managing Autohotkey scripts.
If you are interested I can post the code for that as well. It's v2. But be aware you would have to replace the links to my computer organization for them to work. It's working well for me. I'm pleased with v2 and it's improved 'elegance'.

image.png
image.png (133.7 KiB) Viewed 1364 times
User avatar
kunkel321
Posts: 1061
Joined: 30 Nov 2015, 21:19

Re: Autohotkey v2 scriptlets to control XYplorer defined Managed Commands from Autohotkey

25 Oct 2023, 15:53

Thanks for the cool tips. Yeah... Please post your v2 menu code!

Regarding saving tabsets in xyplorer, but sure to check out FluxTorpedo's 'Session Manager'
https://www.xyplorer.com/xyfc/viewtopic.php?t=8691

It's not an AHK thing though. It's XYS code. It's pretty cool. I've used it with xyplorer for years.
ste(phen|ve) kunkel

Return to “Other Utilities & Resources”

Who is online

Users browsing this forum: No registered users and 88 guests