iswitchw mod - Fast window and browser tab switching - Updated Oct 1st, 2023!
-
- Posts: 29
- Joined: 24 Jun 2020, 16:42
iswitchw mod - Fast window and browser tab switching - Updated Oct 1st, 2023!
iswitchw
Quick fuzzy find-as-you-type searching and selection of open windows (and Chrome & Firefox tabs!).
The text will turn green if there's only there's only one result, or red if there's no matches, though the last valid matches will remain in the list. Hitting delete, Ctrl+Backspace, or Ctrl+W will clear the input in either case.
Multiple extra shortcuts are available, you can navigate with Tab/Shift+Tab, Arrows, Home/End, or PgUp/Dn. You can also focus a specific tab with Win+0-9 for the first 10 tabs, or with a numerical hotstring, by typing the row number then ending with a space (up to 99).
Active Chrome and Firefox tabs are listed, and selecting the row will activate the window and select the applicable tab.
This is a fork of an older version that hasn't been updated in the better part of a decade, but I was still using it and figured I'd try my hand at making a few improvements. There's lots of shortcuts, and the window can be moved and resized, with the position saved between sessions. Listing and selection of Chrome & Firefox tabs is possible via Chrome remote debugging protocol and the Acc.ahk library (with jeeswg's related functions) respectively, which is included. See the readme for full details of course.
https://github.com/evilmanimani/iswitchw/
Credits to tvjg, who's script I modified, and to the others that came before. Looks like this program has been shambling along for quite a few years now in multiple iterations
https://github.com/tvjg/iswitchw
Quick fuzzy find-as-you-type searching and selection of open windows (and Chrome & Firefox tabs!).
The text will turn green if there's only there's only one result, or red if there's no matches, though the last valid matches will remain in the list. Hitting delete, Ctrl+Backspace, or Ctrl+W will clear the input in either case.
Multiple extra shortcuts are available, you can navigate with Tab/Shift+Tab, Arrows, Home/End, or PgUp/Dn. You can also focus a specific tab with Win+0-9 for the first 10 tabs, or with a numerical hotstring, by typing the row number then ending with a space (up to 99).
Active Chrome and Firefox tabs are listed, and selecting the row will activate the window and select the applicable tab.
This is a fork of an older version that hasn't been updated in the better part of a decade, but I was still using it and figured I'd try my hand at making a few improvements. There's lots of shortcuts, and the window can be moved and resized, with the position saved between sessions. Listing and selection of Chrome & Firefox tabs is possible via Chrome remote debugging protocol and the Acc.ahk library (with jeeswg's related functions) respectively, which is included. See the readme for full details of course.
https://github.com/evilmanimani/iswitchw/
Credits to tvjg, who's script I modified, and to the others that came before. Looks like this program has been shambling along for quite a few years now in multiple iterations
https://github.com/tvjg/iswitchw
- Attachments
-
- iswitchw-master.zip
- (647.67 KiB) Downloaded 48 times
Last edited by evilmanimani on 01 Oct 2023, 22:05, edited 9 times in total.
Re: iswitchw - Back from the dead. Now with Chrome tabs!
Here is contemporary GetAltTabWindows by teadrinker if you're interested.
-
- Posts: 29
- Joined: 24 Jun 2020, 16:42
Re: iswitchw - Back from the dead. Now with Chrome tabs!
Hey, thanks. I actually figured out the following on my own, which returned the same results as teadrinker's in my testing, and appears even simpler, unless there's some caveat I'm missing.
I've changed my approach and swapped chrome.ahk for Accv2.ahk, and implemented jeeswg's functions from here: https://www.autohotkey.com/boards/viewtopic.php?f=6&t=26947&p=294316#p294316
The result being that tabs are now listed and can be focused in both Chrome & Firefox, without requiring debug mode or anything like that. I've accounted for tab grouping in Chrome, so the listings are updated accordingly there, I've updated the zip in the first post.
I also fixed a couple issues, related to DPI scaling (disabled it, it's annoying to deal with) and sometimes rows not focusing their corresponding window.
Code: Select all
w::
top := DllCall("GetTopWindow", "Ptr", "")
Loop {
next := DllCall("GetWindow", "Ptr", A_Index = 1 ? top : next,"uint", 2)
WinGetTitle, title, % "ahk_id" next
If title {
i++
str .= Format("{:-3}{}",i . ":",title) "`n"
}
} Until !next
Msgbox, % str
str := i := ""
Return
The result being that tabs are now listed and can be focused in both Chrome & Firefox, without requiring debug mode or anything like that. I've accounted for tab grouping in Chrome, so the listings are updated accordingly there, I've updated the zip in the first post.
I also fixed a couple issues, related to DPI scaling (disabled it, it's annoying to deal with) and sometimes rows not focusing their corresponding window.
Re: iswitchw mod - Fast window and browser tab switching
Very nice. Any plans to include chrome bookmarks or history in the results, prioritized below open tabs of course? It would be convenient for times you already closed the tab or just for quick access to anything whether open or closed.
Re: iswitchw mod - Fast window and browser tab switching
Not sure why, but my Chrome tabs aren't showing up at all. Another issue I have is that typing a number followed by space doesn't select a row (or do anything that I can tell). I got the latest from your github, so let me know if you have any suggestions. Thanks!
Edit: I downloaded from your OP, which fixed the issue of a number + space not working. However, I still can't get Chrome tabs to show up. I've closed/restarted Chrome and iswitchw. Also tried running Chrome in debug mode. I must be overlooking something...
Edit: I downloaded from your OP, which fixed the issue of a number + space not working. However, I still can't get Chrome tabs to show up. I've closed/restarted Chrome and iswitchw. Also tried running Chrome in debug mode. I must be overlooking something...
-
- Posts: 29
- Joined: 24 Jun 2020, 16:42
Re: iswitchw mod - Fast window and browser tab switching
Hey there, hadn't had a look at this in a bit, and yeah it appears to be broken, something must have changed in a chrome update; I'll take a look when I get a chance.
- Thoughtfu1Tux
- Posts: 125
- Joined: 31 May 2018, 23:26
Re: iswitchw mod - Fast window and browser tab switching
Loving this script! But Firefox got broken by a recent update as well.
-
- Posts: 29
- Joined: 24 Jun 2020, 16:42
Re: iswitchw mod - Fast window and browser tab switching
I updated it on Github and in the attachment to fix Chrome tab support, Firefox support does continue to work though in my testing, but I'd recommend ensuring that you're launching with the x64 version of AHK or it won't be able to see 64bit processes. Vivaldi support is broken, as well, if anyone uses it besides me.
Re: iswitchw mod - Fast window and browser tab switching
Chrome is not showing up at all for this update for me. MSEdge at least appears and returns the last used tab, but doesn't show separate tabs. I am using AutoHokey v1.1.33 (Unicode 64-bit).
-
- Posts: 29
- Joined: 24 Jun 2020, 16:42
Re: iswitchw mod - Fast window and browser tab switching
Do you have "Native accessibility API support" enabled in chrome://accessibility ? You may need to reload the script after enabling that in Chrome.
Re: iswitchw mod - Fast window and browser tab switching
If I enable "Native accessibility API support"" it works, thanks!
Re: iswitchw mod - Fast window and browser tab switching
Superb script. The only thing not working is searching for numbers and in addition a period.
I have many files open that have a version number in the name e.g. workshop 2.1. It would be great of it also could search for "2.1".
When pressing the '.' the script exits.
Does anyone know what to change to make this possible?
I have many files open that have a version number in the name e.g. workshop 2.1. It would be great of it also could search for "2.1".
When pressing the '.' the script exits.
Does anyone know what to change to make this possible?
Re: iswitchw mod - Fast window and browser tab switching
Ad numbers: In the RefreshWindowList() function comment out:
Code: Select all
if (search ~= "^\d+")
return
Code: Select all
Loop 99 {
KeyFunc := Func("ActivateWindow").Bind(A_Index)
Hotkey, IfWinActive, % "ahk_id" switcher_id
Hotstring(":X:" A_Index , KeyFunc)
}
P.p.s.: Once the script considers an entry as match (green text) or mismatch (red text) you can still edit the entry by selecting part of it by mouse or Shift + Left/Right and entering new text w/o using Del or BackSpace which would erase entire entry.
Re: iswitchw mod - Fast window and browser tab switching
Thanks a lot. That did it. Much appreciated! This is a huge game changer from a generic Windows usability perspective.
Re: iswitchw mod - Fast window and browser tab switching
Did anyone test if it still works on Windows 11 as well? It now has become an important part of my toolset but need te migrate to W11 soon.
-
- Posts: 29
- Joined: 24 Jun 2020, 16:42
Re: iswitchw mod - Fast window and browser tab switching
Hey, surprised there's still folks using this, but happy to see that's the case
You'll be pleased to hear that it does indeed work on W11, and I've also managed to get both Vivaldi and Chrome tab listing/switching working for a coming update by using the Chrome Devtools protocol (without requiring Chrome.ahk for that matter), once it's up, all that is needed is to create a shortcut to your browser with
Code: Select all
--remote-debugging-port=9222
Firefox support relied on Acc.ahk, and it appears that the paths have broken once again , still looking into that, but admittedly at a lower priority since I don't presently use Firefox myself. If anyone has any guidance on that part I'm all ears.
I should be putting an update on Github in the next day or so here so keep an eye out for that. For the future I'm hoping to get a simple config dialog working. Any suggestions or feedback is appreciated. Cheers.
-
- Posts: 29
- Joined: 24 Jun 2020, 16:42
Re: iswitchw mod - Fast window and browser tab switching
Just pushed the update for those changes, let me know if you run into any hiccups!
https://github.com/evilmanimani/iswitchw
https://github.com/evilmanimani/iswitchw
-
- Posts: 29
- Joined: 24 Jun 2020, 16:42
Re: iswitchw mod - Fast window and browser tab switching - Updated Oct 1st, 2023!
If you happened to grab it from the OP or Github just since my last post, might want to grab it again. Made a quick change so that the script won't become unresponsive while It's connecting to Chrome/Vivaldi to grab the tab list.