• 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: AS Library Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AS Library Question


  • Subject: Re: AS Library Question
  • From: Shane Stanley <email@hidden>
  • Date: Thu, 03 Dec 2015 09:25:20 +1100

On 3 Dec 2015, at 9:01 AM, Stan Cleveland <email@hidden> wrote:
>
> Any thoughts?

I can't point you to any documentation, but I'm a bit surprised that you're surprised ;-)

I mean, if you strip your script to this and run:

on stripWhiteSpace(str)
	-- removes leading and trailing whitespace
	do shell script ("ruby -e \"puts('" & str & "'.strip)\"")
end stripWhiteSpace
stripWhiteSpace

you see the same thing. Similarly, if you use load script:

set x to load script "/Users/shane/Desktop/Test.scpt"
x's stripWhiteSpace

And script libraries are really load script in new clothing.

Hang on, Matt Neuburg's book has something to say on it:

"A handler is a datatype in AppleScript. This means that a variable's value can be a handler. In fact, a handler definition *is* in effect the declaration (and definition) of such a variable."

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


  • Prev by Date: Re: Scripting calendar - UIDs and moving from one cal to another
  • Next by Date: Re: Scripting calendar - UIDs and moving from one cal to another
  • Previous by thread: Re: silly errors
  • Next by thread: Re: AS Library Question
  • Index(es):
    • Date
    • Thread