Re: A Subtle Error
Re: A Subtle Error
- Subject: Re: A Subtle Error
- From: "Nigel Garvey" <email@hidden>
- Date: Sun, 16 Jan 2011 15:44:07 +0000
Luther Fuller wrote on Sun, 16 Jan 2011 09:23:15 -0600:
>on scanApplications(folderRef, indent, leaders, fileRefNr, folderPath)
> tell application "Finder"
> --
> -- get a list of applications in applList
> --
> if (count items of applList) > 0 then
> write folderPath to fileRefNr -- <<<<<<<<<<<<<<<<<<<
[snip]
When I ran the script, I was surprised to
>always get an error at ...
>
> write folderPath to fileRefNr -- <<<<<<<<<<<<<<<<<<<
>
>I wasted a couple of hours trying to understand and fix the problem.
>Finally, I read the handler code carefully, again, and fixed the problem
>with ...
>
> tell me to write folderPath to fileRefNr -- <<<<<<<<<<<<<<<<<<<
Your original code tells the Finder to write to fileRefNr. If you didn't
open the access within a Finder tell statement too, the reference number
will have been assigned to the application running the script rather
than to the Finder. Only the application which opened the access can use it.
NG
_______________________________________________
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