[TxMt] Enter to open URL - cmd-enter to open in background?
Timothy Bates
timothy.c.bates at gmail.com
Sat Oct 28 15:17:40 UTC 2006
>> So that's one solution - I bet it is what mail.app uses. We could
>> tell by snooping on apple events
> Mail has this feature?
Yes. Try cmd clicking a link in an link in an email. It opens in the
background, which is very handy. However, I see that it also obeys the app
pref to open in a new tab in the existing window if one exists.
> As for the AppleScript, for me both Safari and OmniWeb opens the
> string as file://
My fault for a quick example - the key is that it opens it as file without
activating the browser.
Working example =
tell application "WebKit"
set theUrl to "http://www.psy.ed.ac.uk"
make new document at end of documents
set the URL of document 1 to theUrl
end tell
But, that needs a new window, not the user's preferred setting (choice of
new tab or new window).
The standard additions contain the command "open location" which opens a url
but also activates the called app...
More information about the textmate
mailing list