0

In this article there's the solution I was looking for, however, I would like to open in a new tab instead of a new window, how should be the text?

Google translate client for OS X

...

on run argv

tell application "Safari"

make new document at end of documents

set URL of document 1 to "http://translate.google.com/#en|es|" & item 1 of argv

end tell

end run

...

1

This StackOverflow mentions:

tell application "Safari"
    tell window 1
        set current tab to (make new tab with properties {URL:"http://www.stackoverflow.com"})
    end tell
end tell

in your case I'd change the properties to:

{URL:"http://translate.google.com/#en/es/" & item 1 of argv}

(changed the URL build-up, since yours won't work with current Google Translate)

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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