• 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: Name only of app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Name only of app


  • Subject: Re: Name only of app
  • From: Robert Poland <email@hidden>
  • Date: Sat, 24 Jan 2009 14:26:55 -0700

I don't know about ugly but it is sure not easy to follow.


On Jan 24, 2009, at 1:55 PM, David Marshall wrote:

On Sat, 24 Jan 2009 10:54:40 -0700, Michelle Steiner wrote:

tell application "Finder" to set x to the displayed name of (path to
frontmost application)
if text -4 through end of x is ".app" then
	set x to text 1 through -5 of x
end if
x

Instead of using "displayed name" and testing for the presence of the ".app" extension, why not just use "name" and strip the extension?


tell application "Finder" to set x to characters 1 thru -5 of ¬
	((name of (path to frontmost application)) as text) as text
x

- - - - -

Dave

Bob Poland - Fort Collins, CO



_______________________________________________
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: Name only of app (From: David Marshall <email@hidden>)

  • Prev by Date: Re: Name only of app
  • Next by Date: How to get Pattern Count of variable
  • Previous by thread: Re: Name only of app
  • Next by thread: Re: Name only of app
  • Index(es):
    • Date
    • Thread