Re: AS Library Question
Re: AS Library Question
- Subject: Re: AS Library Question
- From: Axel Luttgens <email@hidden>
- Date: Thu, 03 Dec 2015 00:37:56 +0100
> Le 2 déc. 2015 à 23:01, Stan Cleveland a écrit :
>
> Hi all,
>
> […]
>
> Further testing shows this works within a self-contained script, no library needed:
> on stripWhiteSpace(str)
> -- removes leading and trailing whitespace
> do shell script ("ruby -e \"puts('" & str & "'.strip)\"")
> end stripWhiteSpace
> stripWhiteSpace
> -- Script Editor result -->
> «handler stripWhiteSpace»
>
> Right off, I can’t think of any ways to utilize this, but maybe it could be useful. Any thoughts?
Hello Stan,
One may expand it further as:
on foo(s)
display dialog s
end foo
set bar to foo
bar("Hello!")
Handlers are kind of properties, in the above example properties of the top level script.
> I’ve looked in vain for this in the documentation, but if I’ve simply missed it, I apologize for the unnecessary noise.
IIRC, this is (at least implicitly) described in the ASLG.
But probably needing to put several disparate pieces together…
HTH,
Axel
_______________________________________________
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