• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dumb Finder scripting question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dumb Finder scripting question


  • Subject: Re: Dumb Finder scripting question
  • From: "Mark J. Reed" <email@hidden>
  • Date: Fri, 14 Dec 2007 18:40:26 -0500

"Unaccepable" is an overstatement.  I find your solution quite
acceptable, thank you.  I just thought there might have been an easier
way.  Apparently not, as you have now spent far too much time
demonstrating. ;-).


On 12/14/07, Laine Lee <email@hidden> wrote:
> On 12/14/07 4:26 PM, "Paul Berkowitz" <email@hidden> wrote:
>
> > Right. I've wondered why there's no "root name" or something similar,
> > myself.
> >
> > And
> >>> set thesourcename to (name of (info for the_item))
> >>> set thesourcename to (text items 1 thru -5 of thesourcename) as Unicode
> text
> >
> > will be wrong in the case of extensions that are longer than 3 characters
> > (there are some ".jpeg" files around, among others. Not to mention one of
> > our favorites here - ".scpt").
> >
> > Best to get both the name and name extension in the Finder, count the
> > extension, and use text 1 to (that -2), if that is not 0, of the name. I
> > know you know that, but maybe not everyone has thought of it.
>
> Right, of course, if you want to eliminate static constraints. I wanted to
> find out if text "munging" is just as unacceptable to Mark as using TIDs,
> and apparently it is.
>
> It seems to me that their was at one time a displayed name property that
> worked, but only if show all extensions wasn't selected in Finder
> preferences. Modest experimentation in 10.5.1 seems to indicate that's still
> true for Applescript's (as opposed to Finder) info, except that some
> extensions appear to be displayed regardless of that setting.
>
> Also, it appears that you can demonstrate a difference between the displayed
>  name and the item name using the Finder, but only if the extension hidden
> property value for the item is false. I don't know what determines that,
> because the preference item in question does not seem to have a consistent
> effect for all file system objects which are either files or packages but
> not folders. For example, I could ask Finder for the displayed name of a
> GarageBand document (a package) and it would return the displayed name which
> did not include the "band" extension whether or not the extension appeared
> in the Finder's visible name for the document, as determined by Finder
> preferences. But for a file having the name exension "m4v", the preference
> setting did not prevent the displayed name of the item from including the
> name extension, and a script asking Finder for info revealed no distinction
> between name and displayed name. I'll bet the ostensible inconsistency is
> related either to launch services or to whether the item is a package, or
> both.
>
> --
> Laine Lee
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>


--
Mark J. Reed <email@hidden>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: Dumb Finder scripting question (From: Paul Berkowitz <email@hidden>)
 >Re: Dumb Finder scripting question (From: Laine Lee <email@hidden>)

  • Prev by Date: Re: Dumb Finder scripting question
  • Next by Date: Re: Dumb Finder scripting question
  • Previous by thread: Re: Dumb Finder scripting question
  • Next by thread: Re: Dumb Finder scripting question
  • Index(es):
    • Date
    • Thread