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 Answer 1

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)

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .