Re: Scripts edited in X ask for finder.app when run under 9
Re: Scripts edited in X ask for finder.app when run under 9
- Subject: Re: Scripts edited in X ask for finder.app when run under 9
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 27 Dec 2001 18:54:40 -0800
On 12/27/01 4:33 PM, "Timothy Bates" <email@hidden> wrote:
>
Hi there,
>
>
Can anyone cast any light on how to avoid difficulties when one is editing
>
scripts under X, then distributing them for OS9 users.
>
>
>
The particular problem is that I compile and test scripts under X which use
>
the finder and a carbon app. When I distribute them, the scripts ask the
>
user to find "finder.app"
>
>
Of course the 9 users haven't a clue what this means, and don't even know
>
to look for the finder in the system folder to fix this.
>
>
Any clues on how to make a 9 distribution that is not broken (without
>
rebooting in 9 and editing each script)?
>
Hmmm. How about:
try
set theFinder to application "Finder"
on error
set finderPath to (path to system folder as string) & "Finder"
set theFinder to application finderPath
end try
using terms from application "Finder"
tell theFinder
--your script
end tell
end using terms from
--
Paul Berkowitz