Re: Finder scripting dies
Re: Finder scripting dies
- Subject: Re: Finder scripting dies
- From: kai <email@hidden>
- Date: Sun, 19 Oct 2003 16:21:34 +0100
on Thu, 16 Oct 2003 18:20:37 -0700, Paul Berkowitz wrote:
>
On 10/16/03 5:37 PM, "Jon Pugh" <email@hidden> wrote:
>
>
> At 1:19 PM -0700 10/16/03, Paul Berkowitz wrote:
>
>> That has been my experience too. But my user is getting the problem
>
>> consistently no matter how often he relaunches the app, the Finder, or
>
>> reboots. OS 10.2.8 6R73.
>
>
>
>> For the first time, a user of one of my run-only scripts has reported the
>
>> same bug which until now I've only seen in a script editor.
>
>
>
> A run only script cannot be decompiled, so I'm not sure how they're seeing
>
> this. It doesn't generally need to know the Finder's terms in order to run,
>
> and that would manifest as a run-time error.
Apologies for the late arrival to this thread, Paul - but I wonder if the
absence of Finder terms might be throwing us a bit off track here.
Your intermittent compiling difficulties are certainly curious - to say the
least! Nevertheless, in spite of the similarity between the symptoms, I'm
still not sure that your client's errors are necessarily the result of the
same problem.
As Jon points out, a standalone script doesn't need to know an application's
terms to work correctly. However, if an error occurs, the script may then
use raw codes instead of terms in an alert message:
>
>> Can't get <<class cdis>> of <<class cfol>> "ili 2:Users:raulqr:Sync
>
>> Entourage-Address Book 1.2.11:" of application "Finder".
>
>
>
> Presumably this is the error. I have to presume that the path is correct,
>
> but there is no error number displayed, which would tell us why the Finder
>
> can't provide the property requested. Given that the terminology isn't
>
> present, I would guess that the Finder is, once again, busy and not
>
> responding in time, to either the property get or the get terminology events.
>
>
Path seems to be correct. I can ask him for a screenshot to get the error
>
number. When I sent him a workaround for that error, the Finder just errored
>
on something else. And other scripts errored to, also on Finder commands.
>
This is a self-standing applet. A different app that fails on the same
>
Finder commands also calls two other apps as well - Entourage and Apple's
>
Address Book. They're never too busy to respond - only the Finder has this
>
problem.
I used the following statement in a test script:
-------------------------
tell application "Finder" to disk of folder "non-existent:folder:"
-------------------------
Initially, I tried running the script in OS 9 (from SE 1.8.3):
--> Finder got an error: Can't get folder "non-existent:folder:".
Because it identifies a problem specifically connected with the *folder*,
this error message is somewhat more helpful than that offered in OS X (from
SE 1.9 or SE 2 beta):
--> Finder got an error: Can't get disk of folder "non-existent:folder:".
Perhaps significantly, when saved as a standalone app in OS X, the script
returns this version of the error message:
--> Can't get <<class cdis>> of <<class cfol>> "non-existent:folder:" of
application "Finder".
My understanding is that an application's dictionary is accessed only when
Script Editor opens/compiles a script that contains a relevant application
tell block - so that any application-specific codes can be translated into
terms that we tend to understand more easily.
While this generally doesn't happen with a standalone, I've sometimes forced
access to application-specific terms by simulating a 'tell app' compile. For
example, by amending the above script to...
-------------------------
run script "tell app \"Finder\"" & return & "end"
tell application "Finder" to disk of folder "non-existent:folder:"
-------------------------
...the standalone version then also returns:
--> Can't get disk of folder "non-existent:folder:" of application "Finder".
Of course, all this may *still* have nothing to do with your client's
problem - and I apologise in advance if it turns out to be a red herring.
I obviously don't know how the path "ili 2:Users:...1.2.11:" is derived in
your script but - in view of the above - I'd be tempted to re-check its
validity before looking elsewhere for a cause...
---
kai
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.