• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Placing long URLs in email
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Placing long URLs in email


  • Subject: Re: Placing long URLs in email
  • From: kai <email@hidden>
  • Date: Thu, 27 Oct 2005 01:33:18 +0100


On 27 Oct 2005, at 00:52, Michelle Steiner wrote:

On Oct 26, 2005, at 4:17 PM, Mark J. Reed wrote:

On 10/26/05, Jan M. <email@hidden> wrote:

Long URLs tend to be cut by some mail apps (on PC side of things) because of
their length. When a long URL falls on multiple lines, the automatic link
become broken for people with PCs. Only the first line becomes clickable.

I'd say your best bet would be to have the script automatically register the URLs with one of the various link-shortening services (e.g.tinyurl.com, metamark.net, makeashorterlink.com with its ironic domain name . . .) and put the shortened link in the email instead of the long one. Most of those services provide a SOAP interface, so you should be able to access them from AppleScript pretty easily.

Maybe just using one of the email OSAXen (e.g., xmail.osax) would do the job.

I sometimes run the following routine (usually from Script Menu) to copy Safari's current URL as a tiny URL. The converted form can then be pasted as required.


------

try
tell application "System Events" to if not (exists process "Safari") then error
tell application "Safari"
if (count windows) is 0 then error
tell document 1 to tell URL
if not (exists) then error
set currURL to it
end tell
end tell
set tinyURL to (do shell script "curl -s http://tinyurl.com/ create.php?url=" & ¬
(quoted form of currURL) & " | awk '/tinyurl value/ { print $NF }'")'s text 8 thru -3
if (count tinyURL) is 0 then error
tell application (path to frontmost application as Unicode text) to set the clipboard to tinyURL
on error
beep
end try


------


The archive link to Jan's original message, for example, is:

http://lists.apple.com/archives/applescript-users/2005/Oct/msg00924.html

As a tiny URL, it abbreviates to:

http://tinyurl.com/e3tjg

---
kai


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Placing long URLs in email
      • From: Martin Orpen <email@hidden>
References: 
 >Placing long URLs in email (From: "Jan M." <email@hidden>)
 >Re: Placing long URLs in email (From: "Mark J. Reed" <email@hidden>)
 >Re: Placing long URLs in email (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Placing long URLs in email
  • Next by Date: Resolving alias to unmounted volume
  • Previous by thread: Re: Placing long URLs in email
  • Next by thread: Re: Placing long URLs in email
  • Index(es):
    • Date
    • Thread