On or near 11/9/03 9:04 PM, Julian Vrieslander at [EMAIL PROTECTED] observed:
> On 11/9/03 8:38 PM, "Allen Watson" <[EMAIL PROTECTED]> wrote: > >> I just copied this from the AppleScript mailing list. Select a word or phrase >> in Entourage, run the script, and it will look it up in Google, using your >> default browser: >> >> tell application "Microsoft Entourage" to set s to window 1's selection >> if (count s) is 0 then set s to (display dialog "Search terms:" default >> answer >> "")'s text returned >> if (count s) is 0 then error number -128 >> set text item delimiters to "+" >> set s to "http://www.google.com/search?hl=en&q=" & s's words >> set text item delimiters to {""} >> open location s > > Doesn't work for me. I select one word in an incoming message, run the > script, and I get "Parameter error." > > Entourage X 10.1.4, OS X 10.3. Weird! It works when I run it from Script Debugger, but run from the Script menu in Entourage I get the same "Parameter error". The error seems to be occurring in the "open location" statement at the end of the script. I've debugged as much as I can. The string passed to the statement is identical when run in SD or in Entourage, so I cannot see any cause for the error. It should work. Maybe Paul or someone else can figure out why it is failing in this case. Meanwhile: Try replacing "open location s" with this: tell application "Safari" activate tell document 1 to set URL to s end tell 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 -- Microsoft MVP for Entourage/OE/Word (MVPs are volunteers) Allen Watson <[EMAIL PROTECTED]> Entourage FAQ site: <http://www.entourage.mvps.org/> AppleScripts for Outlook Express and Entourage: <http://members.thinkaccess.net/[EMAIL PROTECTED]/Scripts/> Entourage Help Pages: <http://www.entourage.mvps.org/> -- 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/>
