Title: Re: Open email in Safari
On 8/21/04 6:25 PM, "Allen Watson" <[EMAIL PROTECTED]> wrote:

Try this script: copy it into Script Editor, save into Entourage Script Menu Items folder, then execute it with an HTML message selected, by choosing it from the Script menu.

property browser : ""

if browser = "" then
   set browser to choose file of type "APPL" with prompt "Please select your default browser."
end if
tell
application "Finder" to set defBrowserName to name of browser

Note: if you're in Panther this won't work as Allen intends, since Entourage's script menu can't save values of properties in scripts made by Script Editor 2.0 (Panther). You're likely to be asked to find your default browser every time you run the script. Until last week or so, we've been advising people to get the free editor Smile and save scripts with properties there. Now the newest version of Smile (2.6.5) - the only available now for OS X - is the same as SE, roughly. It might save the saved property for a few runs and then forget. (This is only in Panther - if you're in Jaguar you'll be OK.)

Now only Script Debugger can make compiled scripts which save properties when run in the Entourage script menu or system script menu (or Smile script menu too, for that matter). But Script Debugger costs $179. So we scripters will have to post compiled scripts for download, which means extra trouble for us, requiring documentation even for simple scripts that we post to the mailing list. That's something of a disincentive, I'm afraid. Actually, the Entourage newsgroup accepts attachments although this mailing list doesn't, so I suppose we can include them as attachments there.

People who find scripts posted on the mailing list useful and would like to be able to save scripts with properties and run them in the Entourage Script menu can petition MS to implement the new Panther APIs Apple has created for script menus via the Help menu/Send Feedback. If that were done, then people in Jaguar would not be able to run the scripts, so perhaps they'll be inclined to change if/when everyone has upgraded to Panther or later. (It should be possible to have conditional code, of course, for the different OS's, such as applications like Tex-Edit Plus must have, but it evidently would be a lot of work that may not be worth it for this "minority" interest.) MS may need to be convinced that this is something a lot of people want.

Nevertheless, the situation at the moment is that Entourage's only method of customization - AppleScript - depends now on scripters in Panther or later possessing a deluxe scripting tool costing $179.

For this particular script there may be a workaround.

    open location theURL

should not need any tell block around it. If you give it a dummy (but real) http:// URL first, it should open your default browser anyway. Then get the creator code of the frontmost process (your browser) and assign that to the file to ensure it doesn't open in TextEdit.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

PLEASE always state which version of Microsoft Office you are using - **2004**, X  or 2001. It's often impossible to answer your questions otherwise.

Reply via email to