Re: New user
Re: New user
- Subject: Re: New user
- From: Nigel Garvey <email@hidden>
- Date: Fri, 31 Aug 2001 02:10:33 +0100
Shane Stanley wrote on Fri, 31 Aug 2001 08:27:06 +1000:
>
On 31/8/01 5:17 AM +1000, Nigel Garvey, email@hidden,
>
wrote:
>
>
> The problem is the '((path to desktop) as text) bit'. The line occurs
>
> within a 'tell' block directed at the Finder, and the 'path to' command
>
> often causes problems in that situation - especially when its parameter
>
> is also one of the Finder's "special folders". One cure is to replace
>
> 'path to' with its Finder equivalent.
>
>
Another cure -- probably more relevant with other than the desktop -- is to
>
add the word folder: "path to desktop folder as text". That seems to keep
>
the Finder happy.
That works on my 9.0.4 machine but not on my 8.6. On the other hand
(double-checking the situation) 'path to desktop' itself works inside a
Finder block on the 9.0.4 machine as well, even after I quit and relaunch
Script Editor and enter the text anew. The 8.6 machine, on the other
hand, when 'path to' is in a Finder block, resolutely complains that
'desktop', 'desktop folder', or whatever else doesn't understand the
'path to' message.
With most scripts, it's probably best to end the Finder 'tell' block and
start another after the 'path to' command. For scripts that are run from
OSA Menu and are likely to be passed to the Finder for execution, I
enclose 'path to' commands in OSA Menu 'tell' blocks. :-)
NG
NG