Hello,

If you like to have such option handy as a contextual menu item for Entourage (or any other app) you can try OnMyCommandCM. It is a free contextual menu plug-in from Abracode which is "programmable" with Unix commands (including AppleScript via osascript call). There are over 200 command descriptions available in the archive. Most of them work in Finder with files but there are also several commands working with text selection. One of them is "Search google for selected or clipboard text" which does exactly what the name says.
OnMyCommandCM is available at:
http://free.abracode.com/cmworkshop/


Be sure to download OMCEdit too which is a companion to OMC. It allows you to edit, organize and download read to use command descriptions from Abracode website.

Hope you find it helpful,

Tom
Abracode, Inc.

On Nov 10, 2003, at 10:00 PM, Entourage:mac Talk wrote:

From: "Laurie A. Duncan" <[EMAIL PROTECTED]>
Date: November 10, 2003 12:58:29 PM CST
Subject: Re: Script to look up selection in Google


On 11/10/03 1:41 PM, The Dept. of Homeland Security picked up the following
electronic transmission from [EMAIL PROTECTED]:


Meanwhile:

Try replacing "open location s" with this:

tell application "Safari"
  activate
  tell document 1 to set URL to s
end tell

The above works, but opens the google search in whatever tab or window is
active in Safari. That is a bummer, since I always have multiple tabs open
and I hate when they get overwritten by a new page.


This will obviously make use of Safari, always, rather than opening your
default browser. It works, however. To make it use a new window:


tell application "Safari"
  activate
  make new document
  tell document 1 to set URL to s
end tell

This fails with an NSArgumentsWrongScriptError


What would the trick be to make it use a new TAB, rather than new window. My
safari prefs are set to open all clicked urls in a new tab, but the first
replacement you offer above overrides that.


It's a handy script when it works :)

Laurie

--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
archives: <http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
old-archive: <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>




Reply via email to