QuickSwitch and JumpToFolder AHK scripts

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Rafaello
Junior Member
Junior Member
Posts: 63
Joined: 2025-04-01, 17:48 UTC

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Rafaello »

I have released a new version v1.4 with various fixes: https://github.com/JoyHak/QuickSwitch/releases
Image: https://github.com/JoyHak/QuickSwitch/blob/main/Images/menu.png

I really need your feedback! If something is not working for you, please let me know. If you think that app can be improved, write to me.

Changelog
Features
  • Display all tabs from:
    • TotalCommander
    • DirectoryOpus
    • XYplorer panels
  • Short path option:
    • The option has become faster.
    • You can hide the first path separator, for example: ..\dir
  • XYplorer dual-pane support
  • Multi-language hotkeys: now the keys set in the settings work in any keyboard layout.
  • Performance: the code has been significantly revised for the better.
Refactoring highlights
  • Improved date and localization display in logs.
  • Added lost global variables in new validators.
  • Keys uses scan codes when they are created.
  • Added safe function to prevent key creation errors.
  • ShowShortPath has been renamed to GetShortPath and now uses faster built-in functions.
  • Improved names and used proper naming style for local, static and global variables.
  • Improved performance:
    • Added AHK v1 specific directives and functions.
    • Added identical variables one-line assigning.
    • Sleep replaced by ClipWait.
    • Xyplorer now works via clipboard because it's faster.
    • Removed Return from Void functions.
    • Added multiple static variables in all Libs.
Fixed
  • Directory Opus wasn't working.
  • The portable version of Total Commander was not detected.
  • Nonexistent hotkey error.
  • Menu did not disappear when clicking anywhere in the file dialog.
  • Menu appeared in different applications and did not disappear when changing settings.
  • Missing Debug button.
  • Constant notification about missing icon in compiled version.
  • The Virtual Path XYplorer specific option has caused display problems: other file managers do not have a similar option that displays simplified real paths. The option has been removed.
Last edited by Rafaello on 2025-04-06, 06:29 UTC, edited 2 times in total.
Rafaello
Junior Member
Junior Member
Posts: 63
Joined: 2025-04-01, 17:48 UTC

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Rafaello »

While I was trying to implement TotalCommander support, I listened to all of "Lord of the lost" songs and all of Fractalize's DJent (X_X)
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6951
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Horst.Epp »

The actual version 1.4 doesn't work with a normal (portable) TC installation.
It ignores the setting UseIniInProgramDir=7 in Wincmd.ini
and creates an Usercmd.ini in the path C:\Users\username\AppData\Local\GHISLER\.
This is never used by TC in this case.
Much too complicated AHK script with a wrong result.
It then creates an em_command in this Usercmd.ini.
A simple solution would be to tell the user what em_command to create.
This would work for any TC installation.
Also, the name of this em_command should not be such simple as [EM_SaveAllTabs]
I would suggest a unique name [EM_SaveAllTabs_QS] for example.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
User avatar
nsp
Power Member
Power Member
Posts: 1912
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *nsp »

Horst.Epp wrote: 2025-04-04, 14:21 UTC .....
A simple solution would be to tell the user what em_command to create.
This would work for any TC installation.
Also, the name of this em_command should not be such simple as [EM_SaveAllTabs]
I would suggest a unique name [EM_SaveAllTabs_QS] for example.
........
I agree with @Horst.Epp I also never used non portable install of TC nor C:\users\.... path to store ini for TC.
It is better to just provide em_QS_cmds or em_cmds_QS in a sample ini file and let user place it where it is needed.
Rafaello
Junior Member
Junior Member
Posts: 63
Joined: 2025-04-01, 17:48 UTC

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Rafaello »

Please provide information about where your configuration are located according to your options. I don't want to ask the user to create anything, everything should be done automatically. If this requires additional steps I want to know what they are.
Rafaello
Junior Member
Junior Member
Posts: 63
Joined: 2025-04-01, 17:48 UTC

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Rafaello »

The application is currently looking for ini in the current TC directory. If it matches InstallDir in the registry, the configuration path will be taken from the registry.

I don't know where else to get the configuration information from as I don't have the %coomander_path% environment variable. I have not found any other way to send em_QS_cmds command to TC. So I need to know where and how to obtain this path...
KozakMak
Senior Member
Senior Member
Posts: 480
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *KozakMak »

https://ibb.co/nvt8zSf

Code: Select all

AHK 1.1.37.02
Windows 10 Pro 22H2 | 19045 ru-UA

Script is compiled. Version: 1.4.0.0
64-bit script for 64-bit system 

07.04 10:36:43    [GetPaths > GetTotalCommanderPaths > RegRead]    1    
07.04 10:36:51    [GetPaths > GetTotalCommanderPaths > RegRead]    1    
07.04 10:36:52    [GetPaths > GetTotalCommanderPaths > RegRead]    1
OS: Win10 | TC: latest x64
User avatar
nsp
Power Member
Power Member
Posts: 1912
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *nsp »

You could ask to run a tc_install script from TC then you have %COMMANDER_INI% to locate wincmd.ini and usercmd.ini or ask location for usercmd.ini.
Rafaello
Junior Member
Junior Member
Posts: 63
Joined: 2025-04-01, 17:48 UTC

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Rafaello »

nsp wrote: 2025-04-07, 14:40 UTC You could ask to run a tc_install script from TC then you have %COMMANDER_INI% to locate wincmd.ini and usercmd.ini or ask location for usercmd.ini.
Does it have user prompts or is it automatic? Does the environment variable appear after execution?
Last edited by Rafaello on 2025-04-07, 15:27 UTC, edited 1 time in total.
Rafaello
Junior Member
Junior Member
Posts: 63
Joined: 2025-04-01, 17:48 UTC

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Rafaello »

KozakMak wrote: 2025-04-07, 08:30 UTC 07.04 10:36:52 [GetPaths > GetTotalCommanderPaths > RegRead] 1[/code]
Thanks, it looks like you have a portable version too. I'll fix it, but current search algorithm may be improved if I get the help I need...
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6951
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Horst.Epp »

Rafaello wrote: 2025-04-07, 15:23 UTC
nsp wrote: 2025-04-07, 14:40 UTC You could ask to run a tc_install script from TC then you have %COMMANDER_INI% to locate wincmd.ini and usercmd.ini or ask location for usercmd.ini.
Does it have user prompts or is it automatic? Does the environment variable appear after execution?
Start TC and a cmd prompt from it.
Run the cmd command set, to see all COMMANDER_ variables,
which are available for any tool or script started from TC.

Code: Select all

COMMANDER_DRIVE=C:
COMMANDER_EXE=C:\Tools\Wincmd\totalcmd64.exe
COMMANDER_INI=C:\Tools\Wincmd\wincmd.ini
COMMANDER_INI_PATH=C:\Tools\Wincmd
COMMANDER_INSTANCE=1
COMMANDER_OPEN=bar
COMMANDER_PATH=C:\Tools\Wincmd
COMMANDER_SESSIONNAME=user
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Rafaello
Junior Member
Junior Member
Posts: 63
Joined: 2025-04-01, 17:48 UTC

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Rafaello »

I'm able to see this variable through Process Explorer and I can run CMD from TC. But I can't do this actions programmatically.
User avatar
nsp
Power Member
Power Member
Posts: 1912
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *nsp »

Give a try with a script like:

Code: Select all

#noenv
EnvGet, OutputVar, COMMANDER_INI_PATH
MsgBox, ini folder in: %OutputVar%
you can convert to exe and run it from TC ou with open on the ahk script...
Rafaello
Junior Member
Junior Member
Posts: 63
Joined: 2025-04-01, 17:48 UTC

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Rafaello »

nsp wrote: 2025-04-08, 12:22 UTC Give a try with a script like:

Code: Select all

#noenv
EnvGet, OutputVar, COMMANDER_INI_PATH
MsgBox, ini folder in: %OutputVar%
you can convert to exe and run it from TC ou with open on the ahk script...
I don't have an environment variable, I made sure of this through the control panel. I tested this script, as well as DllCall("GetEnvironmentVariable", ..)

It is not added automatically...
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6951
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Horst.Epp »

Rafaello wrote: 2025-04-08, 13:25 UTC
nsp wrote: 2025-04-08, 12:22 UTC Give a try with a script like:

Code: Select all

#noenv
EnvGet, OutputVar, COMMANDER_INI_PATH
MsgBox, ini folder in: %OutputVar%
you can convert to exe and run it from TC ou with open on the ahk script...
I don't have an environment variable, I made sure of this through the control panel. I tested this script, as well as DllCall("GetEnvironmentVariable", ..)

It is not added automatically...
Sorry, you say confusing things and make unnecessary complicated steps.
As told from NSP, there is no need for a DLLCall to get environment variables in AHK.
TC variables are added definitely when TC is started and are available to each Tool or script running from it.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Post Reply