• 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
The displayed name weird behaviour...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The displayed name weird behaviour...


  • Subject: The displayed name weird behaviour...
  • From: Emile Schwarz <email@hidden>
  • Date: Fri, 04 Mar 2005 20:27:25 +0100

Hi,

I was thinking that when one change the extension hidden to true (it is set on my machine to false as default) that the name or displayed name (I think that it was this one) shows the file name without its extension...

Example:

tell application "Finder"
	-- ask the user to choose a file
	set zeFile to choose file

	-- hide the extension
	set extension hidden of zeFile to true

	-- get the file properties
	return properties of zeFile
end tell


Here is a part of the returned properties string:

{class:document file, name:"ColorSyncScripting Profile.jpg", index:1, displayed name:"ColorSyncScripting Profile.jpg", name extension:"jpg", extension hidden:true,

I cut the remainder of the properties list.


As you can see, name and displayed name returns the exact same string that include the extension :( weird :(.



Is it a bug or a (my) misunderstanding ?

Cheers,

Emile


BTW: Take a breath before reading the next sentence and a second at the end of the second line and a third at the end of that sentence :)


I feel that I have a work around. I compute the length of the extension, add 1 (for the dot), get the left part of the string using the string length - 4 (extension length + 1 for the dot), add the suffix I want to use, a dot and the original extension string. Duh!


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: The displayed name weird behaviour...
      • From: John Stewart <email@hidden>
  • Prev by Date: persistence of script properties
  • Next by Date: Re: The displayed name weird behaviour...
  • Previous by thread: Re: persistence of script properties
  • Next by thread: Re: The displayed name weird behaviour...
  • Index(es):
    • Date
    • Thread