• 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: why this error code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why this error code


  • Subject: Re: why this error code
  • From: KOENIG Yvan <email@hidden>
  • Date: Sun, 20 May 2012 18:55:15 +0200

Le 20 mai 2012 à 18:44, Bob Cuilla a écrit :

> What the heck am I missing?
>
> I have a simple script to extract file info.  it works fine and returns the correct data (script below)
>
>
> tell application "Finder"
>
> 	set theFile to "users:bcuilla:desktop:test file.pages" as alias
> 	set fileInfo to info for theFile
>
> end tell
>
>
> but i get a applescript error number -10004 in the editor when i view Replies (snippet below)
>
> can anyone explain this?  is it a bogus error?

Your code is the culprit.

(1) info for is deprecated

(2) The error message is due to the fact that you called a function belonging to an OSAX (Standard Additions) from a tell Application "Finder" block.
Why are you encapsulating the two instructions in such a block ?

set theFile to "users:bcuilla:desktop:test file.pages" as alias
set fileInfo to info for theFile

would behave flawlessly.

Yvan KOENIG (VALLAURIS, France) dimanche 20 mai 2012 18:55:11




 _______________________________________________
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: 
 >why this error code (From: Bob Cuilla <email@hidden>)

  • Prev by Date: why this error code
  • Next by Date: Re: why this error code
  • Previous by thread: why this error code
  • Next by thread: Re: why this error code
  • Index(es):
    • Date
    • Thread