It asks for a search term, which it matches against the name (title) of every open tab, as well as the URL. If it finds one match, it raises that window to the top and switches to that tab. If it finds multiple matches, it offers you a list of matches that you can select from.
To set this up, look in Applications, then Utilities, and run "AppleScript Editor". Cut and paste the program above into a new window there and save it as "Find Safari Tab" (or whatever name you like), and place it in your home directory, under Library/Scripts. Then in the AppleScript Editor Preferences, check the box "Show Script menu in menu bar (I also uncheck "Show Computer scripts", which would show lots of system scripts you might not want). You'll get a script menu in your menubar with your new script in it. Just select it to run it.
This script has a younger brother which does roughly the same thing for Terminal windows and tabs: Find Terminal Sessions.
And if you're wondering how I converted the AppleScript Editor formatted program into HTML, I also do that with software. I can convert any copied text that has formatting into HTML.
At 2017/05/09 11:27|
What a great idea - been wanting to do something like this for a very long time. YEARS!!! |
I then used this to create a service which allows a keyboard shortcut to be assigned to it and now anytime I need I just type in the shortcut and enter a string and get a list of Safari tabs that I can select from and bam - I'm where I wanted to be. So handy and so easy to use.
Thanks so much - you made my time in Safari so much more enjoyable.
At 2017/08/30 18:59|
Thanks, this is great (for a tab sprawler like me)! |
I combined it with Safari>Debug>Miscellaneous flags>Show web process IDs in page titles.
Now I can also easily remedy PIDs that Activity Monitor identifies as not responding.
OSX 10.11.6 (15G1611), Safari 11.0 (11604.1.38.1.3)
At 2017/09/26 10:05|
This is a very important feature that Safari has been missing. Vim-emulation plugins for other browsers all allow searching through tabs with just one single key, e.g. Vimperator or cVim. If there could be a shortcut set to invoke this, it would be even better. Seems that one can indeed assign a shortcut to launch Applescript as described at for example here: https://apple.stackexchange.com/questions/175215/how-do-i-assign-a-keyboard-shortcut-to-an-applescript-i-wrote|
Add a comment
More Mac OS X Stuff
||Send Me Email|