Setup Safari Tab Switching Shortcuts With Spark

I like minimizing the use of the mouse when I’m on the computer – I’m a heavy keyboard user – switching between tabs in my favourite internet browser is a very big part of that. I don’t like having to use the mouse to do that, but when I first switched to Safari from Firefox, I saw that the common ⌘ 1 or ⌘ 2 shortcuts were bound by default to opening the 1st and 2nd bookmarks bar bookmark, instead of my first and second open tabs.

The following, is a handy solution I’ve found (with the help of Roberto Carjaval) and the good people at http://www.shadowlab.org/ who’ve developed a piece of software called Spark (my own mirror here, version 3.09b). “Spark is a powerful, and easy Shortcuts manager. With Spark you can create Hot Keys to launch applications and documents, execute AppleScript, control iTunes, and more…”

As you can probably tell, I’ll only be showing you how to use Spark to bind ⌘ 1 to the first tab open in Safari, and ⌘ 2 to the 2nd, so on and so forth.

Note: This guide only works for people using Apple’s Mac OS X operating system, if you’re using Safari on Windows, you may have to keep looking for a solution.

Step One

Download Spark.dmg (mirror here), launch it, and then drag it to your applications folder. If you’re a rookie to
Mac OS X, then you should know that this is a pretty standard process. Image attached below.

Drag Spark From The Newly Downloaded *.dmg File To Your Applications Folder

Drag Spark From The Newly Downloaded *.dmg File To Your Applications Folder


Step Two

Launch Spark, and at the top of the window click the wide rectangular button with the Apple Logo labelled “All Applications’s HotKeys”. You’ll see a left table open up with “All Applications” and “Finder”. Click the “+” (1) at the bottom of the screen, then choose your Applications folder (2) and click on Safari (3), then click open (4). Image attached below.

Add Safari to the Application Bank In Spark

Add Safari to the Application Bank In Spark

Step Three

Now that you’ve added Safari to the applications bank within Spark, you can start adding scripts. As coincidental as it is, the shortcut to add a new script in Spark just happens to be ⌘1. Once you push ⌘1 (in Spark) you’ll that a new window pops down – this is where we’ll “code” the ⌘1 shortcut to tab1 in Safari, ⌘2 to tab2, so on and so forth.

Click the shortcut dialog where it’s greyed out “click to edit” and you’ll see it’ll highlight blue, then push ⌘1 (1) and you’ll see it’ll input that shortcut. Next, name this specific action – I’ve named it tab1 (2). Last, you’ll add the following text (3) to the large script dialog below:

tell front window of application "Safari" to set current tab to tab 1

The finished product should look a little like the following:

Your First Script Finished

Once your screen looks like this, you're prepared to click update.


Click update in the bottom right corner and you’ll see that now you have a new script in the list:

Repeat this process (remember ⌘1 in Spark to add a new script), but when you’re assigning additional scripts, the shortcuts must be adjusted to ⌘2 for tab2 (name it tab2, so on and so forth), and then in the script be sure to change the “…to set current tab to tab 2″

Step Four

Last but not least, at the bottom centre of the main Spark window, you’ll see a green play button that is followed by the text “Start Spark Daemon”. Clicking the green play button once will enable Spark and have it running in the background and will enable all your scripts (if you choose to find more, or make more yourself) to function. Without this “playing”, none of your scripts will work – also, once you push play it will stay enabled (running in the background) even if you quit the application or restart your computer. I’ve personally tested this on multiple versions of Mac OS X 10.6 Snow Leopard and thus far is still working with 10.7 and 10.7.1 of Mac OS X Lion.

That should be all you need to get this going, If you’re having trouble try doing a quick re-read of this article and maybe seeing if you missed a step, otherwise, feel free to contact me if you really need it! Comments are always appreciated to know that you’ve been able to follow my instructions, and encouraging to others who may be having trouble.

If you really valued this guide or have 5 minutes to spend reading www.marccizravi.com/donate/, much appreciated.


Choose Amount

2 comments to Setup Safari Tab Switching Shortcuts With Spark

  • tuke

    Thanks you for the great article. It solved my long lasting problem. However is Spark the only way to make tab switching available? It seems very old software and isn’t in continuous development..

  • It’s working sufficiently for me now, who knows, maybe Safari will integrate natively in future versions. But if it’s working on Lion, you’ve got nothing to worry about for the next couple of years.

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>