• 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: on run blocks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: on run blocks
  • Next by Date: Re: on run blocks
  • Previous by thread: on run blocks
  • Next by thread: Re: on run blocks
  • Index(es):
    • Date
    • Thread