AppleScript to search the contents of Safari Windows & Tabs

I have too many windows open in Safari (416 tabs in 133 windows currently – yah, I wrote an AppleScript to count those 🙂 ).

Got tired of not being able to find something I knew I had open so I wrote an AppleScript to search the text content of all Safari tabs in all Safari windows that aren’t minimized (even across Spaces).  Does not currently search tabs in windows that are minimized to the dock.

I’ve now found this useful enough that I thought I’d share it.  Disclaimer: I’m not an AppleScript programmer and don’t really like AppleScript (probably because I don’t know the language and tricks!).  There are likely things that could be done better or smarter.  Contributions welcome.

That said, this seems to generally work and, thanks to me learning about using references, fast enough that I wasn’t sure it was actually working at first 🙂

Source is on GitHub here.

Instructions for installation are in the Read Me there.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: