Re: How to properly include a script library?
Re: How to properly include a script library?
- Subject: Re: How to properly include a script library?
- From: Shane Stanley via AppleScript-Users <email@hidden>
- Date: Tue, 19 Apr 2022 10:31:49 +1000
On 19 Apr 2022, at 12:51 am, Jenni via AppleScript-Users
<email@hidden <mailto:email@hidden>>
wrote:
>
> set my_server to "set.server.com <http://set.server.com/>"
> property server : "property.server.com <http://property.server.com/>"
> property fmp_record : "Test String"
>
> Then in my calling script I have:
>
> use AppleScript version "2.7"
> use scripting additions
> use script "TestLib"
>
> display dialog fmp_record
>
> but SD says "The variable fmp_record is not defined." Same response whether
> it's a property or using set.
>
> Testing doesn't get any simpler than this, but I just can't see the
> problem. Any ideas?
You need to let your script know what fmp_record belongs to, usually by
defining a property that is a reference to the library:
use AppleScript version "2.7"
use scripting additions
use theScript : script "TestLib"
display dialog theScript's fmp_record
--
Shane Stanley <email@hidden <mailto:email@hidden>>
<www.macosxautomation.com/applescript/apps/
<http://www.macosxautomation.com/applescript/apps/>>, <latenightsw.com
<http://latenightsw.com/>>
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden