Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

My current code involves a "Watch Me Do" block recording a W keystroke and then opening the new URL, but that's kind of kludgy. Is there any way I can use Automator to open a URL within the current tab? AppleScript would also be acceptable.

(Is this question too basic for Stack Overflow?)

share|improve this question

migrated from Jan 31 '12 at 13:18

This question came from our site for professional and enthusiast programmers.

tell application "Safari" to set the URL of the current tab of the front document to ""
share|improve this answer
@nK0de If you're going to edit a post, please make sure that the edit is constructive. For example, please don't change the formatting of a poster's code so you can understand it. Most of the time, we know what we're doing and we wrote it the way we did for a specific reason. Just food for thought. :) – fireshadow52 Jan 26 '12 at 17:42
okay. I thought it was a mistake. sorry about that. – nK0de Jan 26 '12 at 18:01
@nK0de It's all good. :) – fireshadow52 Jan 26 '12 at 18:12
this showed up in the review list. That's why I thought it was wrong. anyway, its cool :) – nK0de Jan 26 '12 at 18:16
That doesn't work for me. Also, the way you have it formatted makes it impossible to see all of the code; I had to copy and paste it. – timothymh Feb 5 '12 at 21:17

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.