• 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: Return command from within a subroutine
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Return command from within a subroutine


  • Subject: Re: Return command from within a subroutine
  • From: Barry Wainwright <email@hidden>
  • Date: Sat, 31 Dec 2005 00:49:05 +0000
  • Thread-topic: Return command from within a subroutine

On 30/12/05 17:46, "Mark Lively" <email@hidden> wrote:

> tell me to quit might work.

One thing that I do is put the entire script in a
> repeat loop and then
say exit repeat.  Or you could use a try block for the
> same thing.

Alternatively you can set a flag and just do nothing for the rest
> of the script.



Or, return a known value and test for it when you call the subroutine:

if doStuff() < 0 then return -99
-- this line won't run


on doStuff()
    return -99
end doStuff

--
Barry



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Return command from within a subroutine (From: Mark Lively <email@hidden>)

  • Prev by Date: Re: hdiutil burn
  • Next by Date: Re: Return command from within a subroutine
  • Previous by thread: Re: Return command from within a subroutine
  • Next by thread: Re: Return command from within a subroutine
  • Index(es):
    • Date
    • Thread