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?)

link|improve this question
feedback

migrated from stackoverflow.com Jan 31 at 13:18

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

1 Answer

tell application "Safari" to set the URL of the current tab of the front document to "whateverURLYouWant.com"
link|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 at 17:42
okay. I thought it was a mistake. sorry about that. – nK0de Jan 26 at 18:01
@nK0de It's all good. :) – fireshadow52 Jan 26 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 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 at 21:17
show 1 more comment
feedback

Your Answer

 
or
required, but never shown

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