• 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: Finder - getting file type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder - getting file type


  • Subject: Re: Finder - getting file type
  • From: DizzyPenguin <email@hidden>
  • Date: Thu, 23 Dec 2004 12:22:13 +0000


On 23 Dec 2004, at 12:06, Bill Briggs wrote:

Is there anyone that can tell me why the below first snippet would *randomly* fail (on a OSX 10.3.7 system) while the second one doesn't, while choosing the same file?

 -- start
x to choose file
application "Finder" to set y to file type of x
 --end

 Can't seem to get it to fail, but I'm not going to run it any more. Half a dozen times is enough today. Most of the files on my desktop don't sport a type code, but the script returns the "" as expected. Those that do have a type code (Frame files) return "FASL" as expected.

Bill,

The issue has now been sorted with (one of) Paul's suggestions of using "System Events" and "file" as follows:

tell application "System Events" to set fType to (file type of file existFile_wExt)

My customer is happy now and all is well.

I've never myself come across this problem nor have any other of my customers, but I have come to the conclusion that something is going wrong with "Finder" on the user's system.

Thanks for your input.

Regards,
Guy
--
DizzyPenguin * autoMAC-it
email : <email@hidden>
website : <http://www.dizzypenguin.com/automac-it/>

 _______________________________________________
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: Finder - getting file type
      • From: Bill Briggs <email@hidden>
References: 
 >Finder - getting file type (From: DizzyPenguin <email@hidden>)
 >Re: Finder - getting file type (From: Bill Briggs <email@hidden>)

  • Prev by Date: Re: Finder - getting file type
  • Next by Date: Re: Finder - getting file type
  • Previous by thread: Re: Finder - getting file type
  • Next by thread: Re: Finder - getting file type
  • Index(es):
    • Date
    • Thread