• 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: Informal poll
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Informal poll


  • Subject: Re: Informal poll
  • From: Shane Stanley <email@hidden>
  • Date: Wed, 18 Jun 2014 10:28:21 +1000

On 17 Jun 2014, at 8:22 pm, Nigel Garvey <email@hidden> wrote:

The new system, despite the hype in the videos to which James linked, only
adds [...] and the ability to use non-vanilla terminology out of
context in scripts, if you think that's a clever idea.

I think your last point relates to the use command, but that really has nothing to do with libraries; you can address libraries with or without it, just as you can write any script with or without it. The command is *required* only within a library script itself, and then only for loading frameworks if it's ASObjC-based.

There's a fair bit of confusion on this point, partly because the two features were introduced at the same time, and partly, I suspect, because many of the examples (especially from me) have used the use command rather than addressing libraries in a tell block.

All of these forms are valid for a script library:

tell script "Check modifier with terms"
set y to checkModifier("command")
end tell

set x to script "Check modifier with terms"
set y to x's checkModifier("command")

set x to script "Check modifier with terms"
tell x
set y to checkModifier("command")
end tell

And if it uses terminology:

tell script "Check modifier with terms"
set y to check for modifier modifying key "command"
end tell

set x to script "Check modifier with terms"
using terms from script "Check modifier with terms"
tell x to set y to check for modifier modifying key "command"
end using terms from


I'd love the core
language itself to have a bit more power, so that it wouldn't be as
necessary to switch to the latest gee-whiz alternative(s).

I don't think anyone would argue with that sentiment.

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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: 
 >Re: Informal poll (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Copy text from pdf to TextEdit
  • Next by Date: Re: Informal poll
  • Previous by thread: Re: Informal poll
  • Next by thread: Re: Informal poll
  • Index(es):
    • Date
    • Thread