• 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: RegExps in AS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RegExps in AS


  • Subject: Re: RegExps in AS
  • From: kai <email@hidden>
  • Date: Thu, 24 Feb 2005 23:49:56 +0000


On Thursday, February 24, 2005, at 03:07 am, some doughnut wrote:

-------------------------

tell application "Finder" to tell folder (choose folder)
	tell (files whose extension hidden is false)
		set n to name
		set extension hidden to true
	end tell
	set l to displayed name of files
	set extension hidden of files whose name is in n to false
end tell
l

-------------------------

Sorry folks - that'll choke if there are no filename extensions showing at all. This should fare better:


-------------------------

tell application "Finder" to tell folder (choose folder)
	tell (files whose extension hidden is false)
		set x to (count) > 0
		if x then
			set n to name
			set extension hidden to true
		end if
	end tell
	set l to displayed name of files
	if x then set extension hidden of files whose name is in n to false
end tell
l

-------------------------

---
kai

_______________________________________________
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


References: 
 >Re: RegExps in AS (From: kai <email@hidden>)

  • Prev by Date: Re: How do I get a script to ask me the number of times to repeat?
  • Next by Date: Re: A question on System prefs
  • Previous by thread: Re: RegExps in AS
  • Next by thread: Re: RegExps in AS
  • Index(es):
    • Date
    • Thread