Re: why this error code
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