Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Open RTF files in Safari' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Open RTF files in Safari
Authored by: bluehz on Apr 03, '03 12:19:13PM

I just discovered something I have never heard or seen before (maybe I just missed it) while testing this hint. I wanted to see just what woudl happen if I dropped an .rtfd file on the Safari icon... nothing... Safari won't even accept the drag. So I thought I would get a little sneaky and change the .rtfd extension on the file to ".rtf" to see if that would fool Safari.... to my amazement, when I accepted the "Are you sure you want to add..." dialog... the Finder proceeded to create a dir in the same location as my original rtfd file and named original-filename.rtf and fill it with and rtf version of the file and extracted graphics from the file. It also works in reverse - if you change the name of the name of the dir containing the rtf and image files back to original-filename.rtfd, the Finder converts it back to an rtfd file!



[ Reply to This | # ]
Open RTF files in Safari
Authored by: tim1724 on Apr 03, '03 01:16:15PM

That's because an RTFD "file" actually is a directory. The finder isn't doing any "conversion" aside from changing the filename. The Finder knows that a folder with a ".rtfd" extension is supposed to be shown as a file, so it shows it as one. When the extension isn't ".rtfd" then the Finder doesn't know that it's an RTFD document so it shows it as a normal folder.

Note that if you want to see the contents of the folder even when the extension is ".rtfd" you can right-click on it and choose "Show Package Contents" to open the directory.

---
--
Tim Buchheim

[ Reply to This | # ]

Open RTF files in Safari
Authored by: maguirer on Apr 03, '03 05:05:38PM

What happens if you hold Option-Command as you drag the .rtfd document on Safari's Icon?



[ Reply to This | # ]
Open RTF files in Safari
Authored by: PancakeMan on May 28, '03 01:14:01PM

I'm a newbie Applescripter using this hint as a way of solving a scripting problem, but it's still not working. I am trying to write a routine that, given an rtfd file, returns the rtf within.

This is what I have so far:

tell application "Finder"
activate SourceFolder
set the name of file (CurrentTitle & ".rtfd") to CurrentTitle
open folder CurrentTitle
set the name of file "TXT.rtf" to (CurrentTitle & ".rtf")
move file (CurrentTitle & ".rtf") to SourceFolder
end tell

I get an error "Can't set name of file ..."

Any suggestions?



[ Reply to This | # ]