textClipping Text Inaccessible
Why does AppleScript treat textClippings differently from other files?
Or does a textClipping not have an end-of-file marker?
The script below will display a selected file (RTF, text, HTML, etc.) as
text. But not the text from a .textClipping. Moreover, it returns an error.
tell application "Finder"
set theFile to the selection
set fileRef to (open for access theFile as alias)
set TextContents to (read fileRef as text before return)
display dialog result
on error x
if x ‚ "End of file error." then display dialog x
close access fileRef
end tell
Al Hatch
|