Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to go to tab number 5 in Safari?

tell application "Safari" to set current tab of document 1 to 5
share|improve this question

This maybe an old question but I ran into this same problem. The solutions so far don't seem to work with Safari 7.x. This is what I had to do

tell front window of application "Safari"
    set current tab to tab gmailTabindex
end tell

The key is the "front window of". If you don't have that it doesn't seem to work.

share|improve this answer
tell window 1 of application "Safari" to set current tab to tab 5

If you run tell app "Safari" to properties of window 1, you'll see that current tab is a property of windows, and that the class of its value is tab.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.