Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / Mac Applications / July 2008



Tip: Looking for answers? Try searching our database.

detect the default extension

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jo_y - 29 Jul 2008 11:36 GMT
someone knows how to do, to filter the default extension- strings
(from inside "Textedit/Contents" of file "Info.plist" )of application
"Textedit", for example?
(i've writed a applescript, whose will use some parameters to automate
the save-process of Text-applications)
1)Automatic title
2)Save in front of finder win
Gregory Weston - 29 Jul 2008 12:52 GMT
In article
<4c2ed9b8-9824-4807-b925-9c4f089db79d@m3g2000hsc.googlegroups.com>,

> someone knows how to do, to filter the default extension- strings
> (from inside "Textedit/Contents" of file "Info.plist" )of application
[quoted text clipped - 3 lines]
> 1)Automatic title
> 2)Save in front of finder win

You're going to have to restate your question. What do you mean by
'detect the default extension?' What do you hope to accomplish? (What is
your *real* goal?)

Signature

"Harry?" Ron's voice was a mere whisper. "Do you smell something ... burning?"
  - Harry Potter and the Odor of the Phoenix

Jo_y - 29 Jul 2008 14:19 GMT
> You're going to have to restate your question. What do you mean by
> 'detect the default extension?' What do you hope to accomplish? (What is
> your *real* goal?)

Hi, W.
i'll try my best to explain the cause of my research,
let's use the application "TextEdit" for example:
if my front document contains only text, without format, i'll mean
without bold, italic, bullets, ect. letters, then Textedit will save
this document  with  the name extension ".txt", if the front doc.
contains formatted text then the application will save it as ".rtf",
else in the last case, if the text document contains pictures too,
then the front doc. gots the name extension "rtfd".

i know a other script, where puts folders or applications in the
finder-dock, and uses the .plist-file to do this task, but it's not
useful in this case. TextEdit uses a .plist- file (/Applications/
TextEdit/Contents/Info.plist) to find the right extension of the front
document.

you find the full-functional applescript, where will use this feature
here:
http://groups.google.com/group/alt.comp.lang.applescript/browse_thread/thread/15
3b5854f070cb54
#

thanks for your attention.
Gregory Weston - 29 Jul 2008 17:31 GMT
In article
<2429712a-6f0b-4bc4-9179-45d4e2a879fc@t54g2000hsg.googlegroups.com>,

> > You're going to have to restate your question. What do you mean by
> > 'detect the default extension?' What do you hope to accomplish? (What is
[quoted text clipped - 15 lines]
> TextEdit/Contents/Info.plist) to find the right extension of the front
> document.

No it doesn't. TextEdit uses the plist file, like every other document
handling application, to publish to the system and related services the
list of document types it's able to handle and the kind of processing
(view vs. edit) that it's able to perform on those files. It does *not*
use that list to "find the right extension of the front document."

It chooses text vs. rtf(d) based on whether the user has defined the
document to be plain text or rich text. It chooses rtf vs. rtfd based on
whether there are embedded images. You might notice that it's not just
picking a different default item from a menu - the whole format menu
changes and the default happens to be the first item in each possible
menu. The contents of those menus are built in code, on demand. It
decides which menu to build and show by examining a property of the
document which is not published in a way that AppleScript (or any other
mechanism) can query.

> you find the full-functional applescript, where will use this feature
> here:
> http://groups.google.com/group/alt.comp.lang.applescript/browse_thread/thread/
> 153b5854f070cb54#
>
> thanks for your attention.

Signature

"Harry?" Ron's voice was a mere whisper. "Do you smell something ... burning?"
  - Harry Potter and the Odor of the Phoenix

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.