Re: Include file
Re: Include file
- Subject: Re: Include file
- From: julifos <email@hidden>
- Date: Wed, 23 Jul 2003 13:25:05 +0200
>
Hi,
>
>
>
is there a way to include a file with global settings in an
>
applescript file ?
>
>
Like include file"Volumes:HD_02:Script:Glob_Settings_for_Project"
>
>
I think in other languages this is a common think.
>
>
Thanks for any hints.
>
>
Goetz
Hi, Goetz.
The most similar function is "load script".
Eg. You have this script, whose functions/properties/whatever you wish share
with several projects:
############ common.scpt
property whatever: "whatever"
to doSomethingCommon(x)
return x^2
end doSomethingCommon
###################
But "load script" does NOT include such code in your current project. It is
a *library*, and it must be present in your system (or in your users' one),
so you can load it and use its methods:
########## some script.app
property library : load script alias "path:to:common.scpt"
library's whatever --> "whatever"
library's doSomeThingCommon(5) --> 25
###################
jj
_______________________________________________
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.