Updated QuickSwitch [AutoHotkey]

Discuss and share scripts and script files...
Filehero
Posts: 2696
Joined: 27 Feb 2012 18:50
Location: Windows 11 whatever

Re: Updated QuickSwitch [AutoHotkey]

Post by Filehero »

Finally got around to install it and got it working (an early version didn't work, but I didn't spent more time on it).

And finally something bringing back some file-ex (no https/TLS url!) vibes! Great! :tup:

Many thanks, Raf! :D

Raf
Posts: 89
Joined: 31 Jul 2024 15:34

Re: Updated QuickSwitch [AutoHotkey]

Post by Raf »

Filehero wrote: 30 Apr 2025 20:25 Many thanks, Raf! :D
Its wonderful! If you can, please try the βeta v1.4.11
I've added ability to restart all Explorer windows on system error and improved performance by reducing disk access.

Improved
  • Read / Write operations to reduce disk usage and improve performance.
  • Values validation performance.
  • Performance if the main ini configuration could not be accessed.
  • Speed of changing path in file dialog.
  • Logging about files QuickSwitch couldn't access (including ini and TotalCmd tabbs file.)
  • Logging for specific actions like deleting configuration.
  • "Menu" tab options naming in "Menu settings".
  • Code readability.
Fixed regressions
  • Turning off "close old dialog" option after opening General dialog.
  • Instant file dialog closing if Auto Switch is enabled.
  • Usage of wrong values entered by user in settings.

Filehero
Posts: 2696
Joined: 27 Feb 2012 18:50
Location: Windows 11 whatever

Re: Updated QuickSwitch [AutoHotkey]

Post by Filehero »

I'm already running 1.4.12. So for, so good. And a nice new icon. :-)

Raf
Posts: 89
Joined: 31 Jul 2024 15:34

Re: Updated QuickSwitch [AutoHotkey]

Post by Raf »

QuickSwitch v1.5

This amazing update is aimed at improving performance and it was prepared thanks to the incredibly valuable testing by Arsiendle and CennoxX! Some settings have been changed, please set them again in "Menu settings".

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
Menu options
  • Black list option: if a menu appears where you don't want it to, you can add that window to the black list. The Menu can still be opened with the main key which can be changed in "Menu settings" > "App".
  • Only Auto Switch: removed "not now", "never here" options. Now there is a single "auto switch" option.
  • Keyboard support: now you need fewer keys to interact with the Menu:
    • Path: 0-9.
    • Auto switch: A
    • Black list: B
    • Settings: S
    • Hide menu: Esc / click anywhere
      Each option and button in the settings has a corresponding key. Press the u̲n̲d̲e̲r̲l̲i̲n̲e̲d̲ l̲e̲t̲t̲e̲r̲ on the keyboard for quick focus:
      C̲ancel – C; Path s̲eparator – S.
      menu.gif
      menu.gif (1.01 MiB) Viewed 1768 times

Menu settings
  • Always Auto Switch: always changes the path. But you can disable this mode for specific windows using "auto switch" Menu option (#64).
    autoswitch.gif
    autoswitch.gif (858.89 KiB) Viewed 1768 times
  • Close old-style file dialog: enable this option if you want to close old-style file dialogs immediately after selecting a path a don't want to wait (#78).
  • Nuke button: sets the default settings and puts the current configuration in the Recycle Bin. Use this option to remove all window settings and force "always Auto Switch" mode. The button is hidden for safety reasons. It can be found after clicking "Reset" or "Debug" buttons.
  • Show menu:
    • If all Menu options disabled (e.g. disable "Auto Switch" to show, enable to hide).
    • After selecting path.
    • Always hide only after losing focus
    settings.gif
    settings.gif (1.24 MiB) Viewed 1768 times


Features
  • Empty menu: if no paths could be found or supported file managers are closed, the menu will display "no available paths".
  • More file dialogs: added support for old-style TreeView dialog with Edit field and simple tree (XY forum); added support for some archivers dialogs including BandiZip, PeaZip, 7-zip and WinRar (#43).
  • Performance: the speed of the following actions has been improved:
    • Auto switch.
    • Navigating the selected path.
    • Determining the type of dialog.
    • Getting paths from file managers.
    • Getting the Directory Opus active tab.
    • Saving and reading the configuration.


Refactored
  • All dialogs now uses same fast function which uses the Edit field instead of the address bar (XY forum).
  • Reduced disk usage (reduced amount of I/O operations).
  • Improved Menu settings and ini options readability (#84).
  • Added retries to fill the path in the dialog (#81).
  • Added check for buttons in the dialog.
  • Added arrows in "Menu settings" numeric fields and added validation of integers on input.
  • Added dialog name to the "Debug" window. Also you can export dialog info and read internal and visible dialog name in the exported file.
  • Reduced the number of iterations when parsing the dialog controls, file manager classes, xyplorer child windows.
  • 0/1 values replaced with true/false (ini still uses integers for reliability).
  • Improved documentation of code and libraries including comments and readme.
  • Complex files are organized into separate libraries.
  • Improved display of notifications and errors.
  • Added logging about files QuickSwitch couldn't access (including main configuration ini and TotalCmd tabbs file.)


Fixed
  • The Menu:
    • Remained permanently open after opening the settings.
    • Didn't disappear after closing the dailog.
    • Showed the various XYplorer variables (XY forum).
  • Slowdown if child window is open in XYplorer.
  • Auto Switch didn't work the first time the dialog was opened.
  • The colour field did not allow a HEX number to be entered in free format: #111111, 0x111111 . . .
  • Errors appeared when the dialog was immediately closed after opening (#82).
  • Rare system error appeared after opening many Explorer windows; added the ability to restart Explorer (#82).

Raf
Posts: 89
Joined: 31 Jul 2024 15:34

Re: Updated QuickSwitch [AutoHotkey]

Post by Raf »

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.

Raf
Posts: 89
Joined: 31 Jul 2024 15:34

Re: Updated QuickSwitch [AutoHotkey]

Post by Raf »

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.

Raf
Posts: 89
Joined: 31 Jul 2024 15:34

Re: Updated QuickSwitch [AutoHotkey]

Post by Raf »

QuickSwitch v1.6

Changelog
Features
  • Enforce Menu: now you can enforce the Menu in any application using the keyboard shortcut: Ctrl+Shift+Alt+0.
    • You can use this feature to test whether QuickSwitch is working correctly in the (target) app in which Menu appears. If it really works, click "Settings > Debug > Export" to export the app info file. Open a suggestion to add this app to QuickSwitch, attach exported file.
    • You can use this feature to try changing the path in any app, but it probably won't work if there are no visible input field (e.g. Filename, Edit) or the target application is running as an administrator. If it works, see the paragraph above.
  • Better error display: QuickSwitch now shows significantly fewer notifications if it's not launched as administrator and can't get paths from file managers or can't change file dialog path. The "permission 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. You can see their names in the notification or find all their names in Errors.log. The error will tell you when this is really necessary. Otherwise, you don't have to worry about it.
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".
  • Apps aren't 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
  • Various syntax errors pop-ups.
  • Opening multiple Explorer windows caused a system error.
  • The tray icon did not reset after pressing "Reset".
  • Entered empty string values in the settings were not saved.
  • Menu residue display and Menu re-linking to non-file-dialog (#88, #94).
  • The menu only displayed one path if "Auto Switch" was enabled.
  • Selecting paths no longer shows an error if the file dialog owner application has an "elevated" status.

WirlyWirly
Posts: 232
Joined: 21 Oct 2020 23:33
Location: Through the Looking-Glass

Re: Updated QuickSwitch [AutoHotkey]

Post by WirlyWirly »

An issue I've encountered is that when AutoSwitch is enabled, it breaks some of the "Save As" dialogs.

For example, in Affinity Photo, if I open the SaveAs menu, rather than just switch directories, it will instead confirm the save into the current directory without waiting for me to set a filename.

If I re-open the SaveAs window, it does it again, which results in the "File already Exists" prompt. This becomes a loop that I have to smash <Esc> to get out of.

As I've never had this issue with the original, I believe this has something to do with the fact that your version is navigating using the input field rather than the breadcrumbs bar.

P.S
I use the ctrl+alt+shift+0 shortcut a lot in XY, so when it stopped working and gave me what looked like a broken menu I got confused. I was about to report an XY bug :P

Norn
Posts: 469
Joined: 24 Oct 2021 16:10

Re: Updated QuickSwitch [AutoHotkey]

Post by Norn »

WirlyWirly wrote: 03 Jun 2025 20:19 As I've never had this issue with the original, I believe this has something to do with the fact that your version is navigating using the input field rather than the breadcrumbs bar.
Yes.
This is part of my code with some delay added, it works fine on my PC, I didn't try to lower the delay as it was fast enough.

Code: Select all

            		SetControlDelay 10
			setKeyDelay 110
			ControlHide("Edit1", winHwnd)
			loop 3
			{
				ControlSetText btnScript, "Edit1", winHwnd
				if (isDialogType = "tabControl") {
					Send "!d"
					hwnd := ControlGetHwnd("Edit1", winHwnd)
					SendMessage(0x00B1, 0, -1, hWnd)
					ControlShow("Edit1", winHwnd)
					return
				} else
				{
					ControlFocus "Edit1", winHwnd
					ControlSend("{enter}", "Edit1", winHwnd)
					sleep 300
Windows 11 24H2 @100% 2560x1440

Raf
Posts: 89
Joined: 31 Jul 2024 15:34

Re: Updated QuickSwitch [AutoHotkey]

Post by Raf »

Noted, thank you. The problem is being discussed here, I'm looking for a solution. Simply adding a delay kills performance.

From the ctrl+alt+shift+0 shortcut Alt will be removed, as the QuickSwitch sets the Alt key to be held down, which makes it impossible to work in the system.

Raf
Posts: 89
Joined: 31 Jul 2024 15:34

Re: Updated QuickSwitch [AutoHotkey]

Post by Raf »

Norn wrote: 04 Jun 2025 22:42 I didn't try to lower the delay as it was fast enough.
The delay only makes sense until the file dialog is fully rendered. If it is visible, a delay of 10-20 ms between commands is sufficient. Now I'm trying to figure out why Autohotkey is receiving incorrect Information about the visibility status of the Edit control.

Can you explain a little bit how you use this code? Does it work all the time or only once when the dialog appears?

Raf
Posts: 89
Joined: 31 Jul 2024 15:34

Re: Updated QuickSwitch [AutoHotkey]

Post by Raf »

QuickSwitch 1.6 was updated
Enforce Menu: now you can enforce the Menu in any application using the updated keyboard shortcut: Ctrl+Shift+Win+0. Details about this feature are described here.

Fixed
  • If "Auto switch" was enabled, the file dialog closed immediately (#77).
  • Broken option "Show menu after leaving settings" (#101).
  • Internal key Ctrl+Shift+Win+0 errors.
  • Alt key freezing in file dialog.
  • Rare issue of missing paths from XYplorer.

Norn
Posts: 469
Joined: 24 Oct 2021 16:10

Re: Updated QuickSwitch [AutoHotkey]

Post by Norn »

Raf wrote: 06 Jun 2025 09:07 Can you explain a little bit how you use this code? Does it work all the time or only once when the dialog appears?
I didn't add automatic switching, usually I switch it by clicking a button or Ctrl+G after the dialog appears.
Windows 11 24H2 @100% 2560x1440

Raf
Posts: 89
Joined: 31 Jul 2024 15:34

Re: Updated QuickSwitch [AutoHotkey]

Post by Raf »

QuickSwitch v1.7

QuickSwitch no longer triggers antiviruses! Now you can be sure that the application is safe because its threat points have been significantly reduced! However, you can always compile the application yourself, as this process is automated.
detection.png
detection.png (198.09 KiB) Viewed 426 times

Changelog

Features
  • Enforce Menu: you can enforce the Menu in any application using the updated keyboard shortcut: Ctrl+Shift+Win+0. The menu will display the paths obtained after the last opening of the file dialog and will not change them until the next opening. Details about this feature are described here.
  • Limit the displayed paths: in "Menu settings" in the "Menu" tab you can set the maximum number of paths to be shown in the Menu. In this case the menu will show the N most recently opened paths in the file managers.
  • Path numbers with shortcuts: this option allows you to select a path using the keyboard and now it works with Numpad keys and additional mouse buttons (some mice have 1-4 numpad). Numbers 10, 11, ... are no longer displayed in the menu as they cannot be physically pressed on the keyboard.

Fixed
  • If "Auto switch" was enabled, the file dialog closed immediately #77.
  • Broken option "Show menu after leaving settings" #101.
  • Internal key Ctrl+Shift+Win+0 errors.
  • Alt key freezing in file dialog.
  • Rare issue of missing paths from XYplorer.

Post Reply