Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Jan 31 '12 at 13:18

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

1 Answer 1

tell application "Safari" to set the URL of the current tab of the front document to "whateverURLYouWant.com"
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
1  
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

 
discard

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.