Re: on run blocks
Re: on run blocks
- Subject: Re: on run blocks
- From: Steve Mills via AppleScript-Users <email@hidden>
- Date: Thu, 20 Aug 2020 13:08:11 -0500
> On Aug 20, 2020, at 11:43, Jenni via AppleScript-Users
> <email@hidden> wrote:
>
> I just ran across a slick little AppleScript for sending messages from
> FileMaker. This works great for notifying me when a long script has finished.
>
> https://www.mbs-plugins.com/archive/2019-03-10/Send_text_message_from_FileMak/monkeybreadsoftware_blog_filemaker
>
> One thing I don’t understand is what the on run block does? Is it
> actually needed here? It seems to work just fine without it.
Any script that does not have a run handler and has code not in any other
handler implicitly has a run handler. This script:
say “run”
That is wrapped in an implicit run handler. Including “on run” is most
important when the script has other handlers as well, such as:
on run
—Runs when you hit run or launch applet.
set fyls to choose file blah blah
my open fyls
end run
on open fyls
—Runs when you drop files onto applet.
log fyls
end open
Steve via iPad
_______________________________________________
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: | |
| >on run blocks (From: Jenni via AppleScript-Users <email@hidden>) |