|
|
An AppleScript to convert the clipboard to plain text
The following AppleScript will transform RTF-formatted contents on the clipboard to plain text and will paste the clipboard into whatever application in which the AppleScript was invoked. This means that you can use the AppleScript with the launcher/keyboard shortcut utility/accessibility menu of your choice. Thanks, everyone, for your comments and suggestions.
An AppleScript to convert the clipboard to plain text
Note: the curly braces and parentheses in the "System Events" code block don't seem to affect the functioning AppleScript. That is, they seem interchangeable.
For the sake of consistency
try
set the clipboard to Unicode text of (the clipboard as record)
on error errMsg
display dialog errMsg
end try
tell application "System Events"
key code 48 using {command down} --Command-tab
key code 9 using {command down} --Command-V
end tell
If you want to paste the text into the frontmost application…
try this:
If you want to paste the text into the frontmost application…
Did you test the code you proposed?
If you want to paste the text into the frontmost application…
Of course I've tested it ;-) |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.16 seconds |
|