• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Compile Error use framework "Foundation" paths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:

What am I doing wrong?

Ed's given you the solution, but an extract from the ASLG might also be useful:

Discussion
Scripting 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.

-- 
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

References: 
 >Compile Error use framework "Foundation" paths (From: John Day <email@hidden>)

  • Prev by Date: Re: Compile Error use framework "Foundation" paths
  • Previous by thread: Re: Compile Error use framework "Foundation" paths
  • Index(es):
    • Date
    • Thread