Re: Compile Error use framework "Foundation" paths
Re: Compile Error use framework "Foundation" paths
- Subject: Re: Compile Error use framework "Foundation" paths
- From: Shane Stanley <email@hidden>
- Date: Sat, 28 Jan 2017 11:28:43 +1100
On 28 Jan 2017, at 7:26 am, John Day <email@hidden> wrote:
Ed's given you the solution, but an extract from the ASLG might also be useful:
DiscussionScripting addition commands are handled differently if a script has use commands. If a script has one or more use commands of any kind, scripting addition commands are not available by default. You must explicitly indicate that you wish to use scripting additions, either with a use or using terms from command. use scripting additions | display dialog "hello world" |
using terms from scripting additions | display dialog "hello world" | end using terms from |
If a script uses use scripting additions , AppleScript may optimize scripting addition commands, sending them to the current application instead of the current target ( it ) when it does not change the meaning to do so. For example, random number does not need to be sent to another application to work correctly, and will always be sent to the current application when imported with use . Without a use scripting additions command, AppleScript must use a less efficient dispatching scheme, so explicitly declaring them is recommended.
This is one of the reasons Script Debugger includes use statements by default in its script templates.
|
_______________________________________________
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