Mac Help Forums


Reply
Thread Tools Display Modes

Automating Simple Mail Text Replacement

 
Member
Join Date: Jan 2007
Posts: 5
 
      7th August 2007
I have never wrapped my mind around Applescript. What I'm trying to do is this. Given an open Apple Mail message, take the selected text and do something with it. So, for example, the message reads:

-----------
Hey! Check out this link:

Code:
12345
-----------
and the 12345 is selected. I want to have that replaced with:

-----------
Hey! Check out this link:

Code:
{url=http://www.foo.com/12345}{img}http://www.foo.com/images/12345}{/img}{/url}
-----------

(I've substituted curly brackets for square ones so as not to confuse the forum software overly.) I'd love to do this in Ruby, which is second nature, but I don't know of a way to invoke that from the Mail menu. So much for open scripting. Hence my question, how the heck does one write Applescript and navigate the object model?

Thanks
 
Reply With Quote
 
 
 
 
Super Moderator
Spawn_Dooley's Avatar
Join Date: Jun 2007
Location: Tassie, the  Isle
Posts: 1,108
 
      8th August 2007
Hi cwd1,

While I can't answer your question directly nor am I sure I fully comprehend what you are asking in the first place, I thought you might appreciate the following:

Unlock More of Your Mac’s Power!
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Logitech MX500 mouse dying - no (obvious) simple replacement. Any suggestions? Peter Kemp UK Macs 5 22nd April 2007 08:20 AM
NSTextField - copy and paste simple text Sebastien TOPIN Programmer Help 2 29th August 2004 01:03 PM
Simple Toast replacement? Peter Ceresole UK Macs 38 22nd June 2004 06:33 PM
Simple Toast replacement? Peter Ceresole UK Macs 0 21st June 2004 03:23 PM
Cocoa: simple HTML text to Unicode Simon Slavin Programmer Help 3 8th September 2003 05:30 PM


All times are GMT +1. The time now is 12:41 PM.
Mac-Help.com is an independent website and is not affiliated with Apple Inc.


Welcome!
Welcome to the Mac Help Forums
 


Latest Threads
New book about Steve Jobs << take part in it!
Arjan (3 Hours Ago, 09:37 AM)

Help! Stupid computer is automatically logging me out
Elizaboo (13 Hours Ago, 10:41 PM)

URGENT Help. Crazy talk Mac!
Joeker (14 Hours Ago, 09:42 PM)

PDF Document
yura (1 Day Ago, 12:13 PM)

Difficulties with internet speed (nothing to do with connection)
sammethh (1 Day Ago, 06:36 AM)

 


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51