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
User avatar
AntonyD
Power Member
Power Member
Posts: 1577
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *AntonyD »

Either we are talking about a little different things, or something in the translation has lost its essence and is now interpreted in the wrong way...

I don't have to go to the folder. I need to get a copy of the search results in Everything in the panel (of my choice) in a new tab
in the form of a virtual list with search results, which Total can do itself if you use its search tool and then display the results in the panel.

BUT the script should be sharpened to work with Everything at a good level. For example, if I add my own column or change their sequence,
the script still has to do its job. It should not be tied to some static constants .

Well, I would like to call it from the context menu in Everything.
#146217 personal license
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6977
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Horst.Epp »

AntonyD wrote: 2025-05-04, 13:23 UTC Either we are talking about a little different things, or something in the translation has lost its essence and is now interpreted in the wrong way...

I don't have to go to the folder. I need to get a copy of the search results in Everything in the panel (of my choice) in a new tab
in the form of a virtual list with search results, which Total can do itself if you use its search tool and then display the results in the panel.

BUT the script should be sharpened to work with Everything at a good level. For example, if I add my own column or change their sequence,
the script still has to do its job. It should not be tied to some static constants .

Well, I would like to call it from the context menu in Everything.
This job is done by the AHK script "Open Everything GUI results" with TC.
https://www.ghisler.ch/board/viewtopic.php?t=75439
You can use any search functions and columns in Everything to get a result.
The final result is feed with Loadlist to a TC panel.

Feel free to make a better one, we had a lot of work to get it. :)
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
Rafaello
Junior Member
Junior Member
Posts: 69
Joined: 2025-04-01, 17:48 UTC

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Rafaello »

Everything shows results from different locations, TotalCmd may not have an API to display such a list as native (but Xyplorer does :D). In this case, it is logical to ask the question: what prevents you from pinning the Everything window to the screen using AltSnap and opening the results in your favorite file manager?
Rafaello
Junior Member
Junior Member
Posts: 69
Joined: 2025-04-01, 17:48 UTC

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Rafaello »

Horst.Epp wrote: 2025-05-04, 13:54 UTC Feel free to make a better one, we had a lot of work to get it. :)
I'll save it to the task list as source. Thanks
User avatar
AntonyD
Power Member
Power Member
Posts: 1577
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *AntonyD »

2Horst.Epp
Feel free to make a better one, we had a lot of work to get it.
If only the scripting language used was at least a little more logical.
Because I really can't wrap my head around all these lines of code in this language.
Therefore, I will definitely not rewrite it on my own.
Well, the current version of this code contains those very very constant conditions for its functioning...
like
EverythingColumnPositions (Default: 2,1)
- The columns 'Name' and 'Path' (must be visible in the Everything GUI)
- The first value is the position of the 'Path' column
- The second value is the position of the 'Name' column
2Rafaello
TC has only one ability to load from external resources a file list: LOADLIST input parameter of cmdline
hh.exe %COMMANDER_PATH%\TOTALCMD.CHM::/commandlineparameters.htm
#146217 personal license
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6977
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Horst.Epp »

AntonyD wrote: 2025-05-04, 17:06 UTC 2Horst.Epp
Well, the current version of this code contains those very very constant conditions for its functioning...
like
EverythingColumnPositions (Default: 2,1)
- The columns 'Name' and 'Path' (must be visible in the Everything GUI)
- The first value is the position of the 'Path' column
- The second value is the position of the 'Name' column
What are the problems with this "Restrictions" ?
If you don't see these 2 columns on the GUI, makes the results almost useless.
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
User avatar
AntonyD
Power Member
Power Member
Posts: 1577
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *AntonyD »

At a minimum, the script should check for these columns. And keep in mind that their names have already been translated!
That is, you cannot open the program in France to search for the name of the column in English.
If the columns are not found, you need to report it! Visually!
If I can shuffle the columns - put them in a different order - this should not confuse the script code,
it should find these columns ITSELF, and not force me to strictly follow the order [2,1]

And so the script clearly needs to be smarter and more predictable than what is currently in that code.
#146217 personal license
User avatar
tuska
Power Member
Power Member
Posts: 4060
Joined: 2007-05-21, 12:17 UTC

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *tuska »

[OT]
AntonyD wrote: 2025-05-04, 21:09 UTC EverythingColumnPositions (Default: 2,1) ...

... And keep in mind that their names have already been translated!
That is, you cannot open the program in France to search for the name of the column in English.
If the columns are not found, you need to report it! Visually!
I think I'm missing something about translations.
1. Everything 1.5a - A complete translation will only be available up from Everything 1.5 Beta
2. Everything 1.4 - Everything.lng.zip can also be used for Everything 1.5a
3. In my opinion, the translations do not play a role when transferring Everything search results to Total Commander.
    Example: Everything 1.5.0.1391a (x64) - Language: French, Total Commander 11.51 (x64) - Language: German
 
    Everything search query (example on my pc): Open Everything GUI results with TC LOADLIST
    The transferred file and folder names are located in my “%COMMANDER_PATH%\EV-Results\EV-Results.txt” file
    and on the automatically created separate tab “Search result:” in Total Commander as example (depends on the settings in the AHK script).

Perhaps you could give a specific example of what you meant exactly (so that I can understand it too)?
Have you managed to transfer the search results from Everything to Total Commander yet?
 
AntonyD wrote: 2025-05-04, 21:09 UTC EverythingColumnPositions (Default: 2,1) ...

At a minimum, the script should check for these columns.

If I can shuffle the columns - put them in a different order - this should not confuse the script code,
it should find these columns ITSELF, and not force me to strictly follow the order [2,1]

And so the script clearly needs to be smarter and more predictable than what is currently in that code.
In Everything 1.5.0.1391a (x64), the “Name” and “Path” columns can be swapped as desired,
with EverythingColumnPositions (default: 2,1), e.g. to “Path”, “Name, etc.(!)” WITHOUT affecting the transfer result!

You can question “works as designed”, apply it, or just leave it alone.

Just as an aside (“works as designed”):
This also applies, for example, to the reordering of columns in Customn column views
with regard to the “Name” and “Ext” columns.

I think this topic is off topic here, so I suggest continuing this discussion in the main thread:
Open Everything GUI results with TC LOADLIST

⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺
EDIT:
The discussion continued here.

Furthermore, a sample solution on this topic was announced here on May 9, 2025:
AutoHotkey version 1.1 script, Everything 1.5a and Total Commander SETTINGS, buttons, etc.(!)
⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺

[/OT]

Windows 11 Pro (x64) Version 24H2 (OS build 26100.3915) - 2025-04-25
TC 11.51 x64/x86 | 'Everything' 1.5.0.1391a (x64)
Search queries: Total Commander <=> 'Everything' <= Windows Search (English)
Open Everything GUI results with TC LOADLIST - AutoHotkey (.AHK) SCRIPT and GUIDANCE, discussions
Transfer 'Everything' GUI results to Total Commander - STEP-BY-STEP GUIDE, summary
Last edited by tuska on 2025-05-10, 14:26 UTC, edited 1 time in total.
Rafaello
Junior Member
Junior Member
Posts: 69
Joined: 2025-04-01, 17:48 UTC

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Rafaello »

Menu may not be displayed if the target app with file dialog is launched as an administrator. To fix these problem, you should run QuickSwitch as admin or restart the target application without admin permission. This is also true for file managers. The details are explained here and here.

I won't add additional checks: is the QuickSwitch, file dialog or any file manager is running as administrator? I also won't add a check to see if the path is valid or virtual. The check must be performed anew each time for each application that QuickSwitch interacts with. It kills performance. If you know a fast algorithm without adding hwnds to the array of checked windows, please open the PR or "code review" issue.
Rafaello
Junior Member
Junior Member
Posts: 69
Joined: 2025-04-01, 17:48 UTC

Re: QuickSwitch and JumpToFolder AHK scripts

Post by *Rafaello »

QuickSwitch 1.5 was updated

Fixed
  • Opening multiple Explorer windows caused a system error.
  • The menu only displayed one path if "Auto Switch" was enabled.

βeta 1.5.3

QuickSwitch now displays “persmission error” if it's not launched as administrator and can't get paths from file managers or can't change file dialog path. The error appears once and will not spam you with notifications.

In this case, it is better to restart QuickSwitch as admin or restart other applications with reduced permissions. The error will tell you when this is really necessary.

Changelog

Refactored
  • The TotalCmd configuration is no longer recreated if TotalCmd is “elevated”.
  • Now any file manager is checked for “elevated” status and paths from it aren't requested if the status is “true”.
  • Applications are not checked for elevated if QuickSwitch is running as an administrator. In this case, any errors are always displayed. However, in this case, no errors usually occur.
  • Reduced code size.
  • Improved comments.
  • Improved errors logging.
  • Improved file dialog type detection. Errors now interrupt app execution.
  • Removed redundant ByRefs.
Fixed
  • The tray icon didn't reset after pressing “Reset”.
  • Entered empty string values in the settings were not saved.
  • IsProccessElevated() and sending messages syntax errors.
  • Menu residue display and Menu re-linking to non-file-dialog (#88,#94)
  • Selecting paths no longer shows an error if the file dialog owner application has an “elevated” status.
Post Reply