On 9/14/08 6:10 PM, Diane Ross <[EMAIL PROTECTED]> wrote:

> Part 4 in the series AppleScripting Entourage: "Create a TinyURL-no more
> broken links" describes how to use an AppleScript to automate the process of
> creating a TinyURL as well as an alternative to running AppleScripts in
> Entourage with TypeIt4Me and TextExpander.
>
> If you're not familiar with a TinyURL, it's an online service that converts
> long URLs into short ones more appropriate to share in email. It's
> especially helpful sending out long links.Long links that are notorious for
> breaking. A TinyURL will not break in email postings and never expires.
>
>
> Create a TinyURL-no more broken links Part 4 (The Entourage Help Blog)
> <http://blog.entourage.mvps.org/2008/09/create_a_tinyurl.html>

Diane:

The blog page describes the use of an AppleScript by Barry Wainwright for
automating the use of the TinyURL service within Entourage.  I created a
compact script with similar functionality and I have attached the text of
the script below.

I've been using a version of this script for some time now in Entourage and
it has performed without problem.  I just highlight a long URL in the draft
of a mail message and then select the script from the Entourage script menu.
It automatically replaces the long URL with a short TinyURL version.

Anyone wanting to make use of the script can open Apple's Script Editor,
paste the text attached below into a blank document, save it as a script,
and then put the script in the "Entourage Script Menu Items Folder", which
is inside the "Microsoft User Data" folder.

-Jeffrey Berman


----- Attachment follows -----

tell application "Microsoft Entourage"
 tell window 1
  if class is draft window and selection begins with "http" then
   set selection to do shell script ¬
    "curl 'http://tinyurl.com/create.php?url="; & selection & ¬
    "' | awk -F\\> '/blockquote.+\\/tinyurl.+b.+br/ {print " & ¬
    "substr($3,1,length($3)-3); exit}'"

  else
   display dialog "A valid URL is not currently selected in " & ¬
    "a draft window." buttons "OK" default button 1 ¬
    with icon stop
  end if
 end tell
end tell

----- End of attachment -----

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