Can you help me find/write an AppleScript to increase/decrease the quote level of selected text?
January 21, 2010 2:52 PM   Subscribe

I'd like an ApplesScript that will let me increase or decrease the quote level of text that I've selected (like using ⌘' and ⌥⌘' in Mail).

Ideally it would take a block of text and wrap it to a certain width, and indent it with > characters prepended. It would be useful in Gmail and in MarsEdit when trying to make a pretty Markdown-formatted blockquote.

The idea would be if I had typed:

The quick brown fox jumped over the lazy dog.

I'd select it, invoke the script, and it would give me:

> The quick brown fox jumped
> over the lazy dog.

(Though I'd likely set the width to be wider.)

TextWrangler and BBEdit both have this feature, as well as Mail, but I'd like to be able to have it as a script so I can use it in any application.

I found a tip here that seems to be what I'm talking about, but I can't seem to get it to work.
posted by davextreme to Computers & Internet (1 answer total)
 
Response by poster: After a bit of fiddling, I got those scripts to work, but, you're right, they're not awesome. For one, they take over the clipboard, and you have to the text in the clipboard to start with, not just selected.

I'd still prefer an Applescript that behaves just like Mail's command does: you select the text, invoke the script, and it reformats the text (without messing up what's in your clipboard).
posted by davextreme at 4:16 PM on January 21, 2010


« Older Best place for Avatar in PDX   |   Help me help my dog... Newer »
This thread is closed to new comments.