[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] 'Where is MacPerl?' in runtime



On Wed, 16 Dec 1998 13:22:16 -0800, Kevin Johnson wrote:

>I have a script that uses DoAppleScript for some file manipulation
>(copying, deleting, namechange, etc). When I create a runtime (with
>runtimebuilder), it asks "Where is MacPerl?". I want the script to run
>automatically without this need for interaction. Is this an applescript
>problem (I have Applescript activate MacPerl to bring the output window
>back to the front.) or do I need to give the directory pathway to something
>within the script?

Hmmm... let me think.

DoApplescript uses plain text to compile into an Applescript at run
time. That means you can't use Applescript's built in capability to
memorize application paths. You specify it by a text path, or at least:
a file name.

But your saving it as a runtime.

Does this mean that "MacPerl" is actually your runtime?

If so, can't you replace the phrase { tell application "MacPerl" } with
the phrase { tell application "$0" } in a double-quotish context?

 I've tested the "script"

	print "I am $0\n";

as a runtime, and it does indeed print it's own (full) path.

BTW is there a flag or something that a script can check, basically
saying "I am (not) a runtime"? Otherwise the code will no longer work as
a droplet.

	Bart.

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch