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

Re: Subroutines


  • Subject: Re: Subroutines
  • From: "Randy Fingeroot" <email@hidden>
  • Date: Mon, 08 Jan 2001 13:36:09 -0500

You can also pass variables to your handler:

set x to 5
set y to x+z
set theResult to subroutinename(x,y)

on subroutineName(x,y) -- or you can rename them for this routine,
subroutinename(a,b)
set aNumber to x+y
return aNumber
end subroutinename
--

Randy Fingeroot
Systems Editor
Tallahassee Democrat
(850) 599-2141
(850) 599-2295 (fax)

> From: email@hidden
> Date: Mon, 8 Jan 2001 11:51:44 -0500
> To: email@hidden
> Cc: email@hidden
> Subject: Re: Subroutines
>
> set result to SubRoutineName()
> display dialog result
>
> on SubRoutineName()
> set x to 2
> return 2
> end SubRoutineName
>
> -Steve
>
>
>
>
> email@hidden on 01/08/2001 11:41:38 AM
>
> To: email@hidden
> cc:
> Subject: Subroutines
>
>
>
> Is there a way to do subroutines in applescript?
>
> I saw an example that went something like this:
>
> on SubRoutineName()
> commands
> end SubRoutineName
>
> If that works, how do I call the subroutine?
>
> Thanks,
> --SGross
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users


References: 
 >Re: Subroutines (From: email@hidden)

  • Prev by Date: Applescript CGIs for Appleshare Web Server
  • Next by Date: Forcing an applet to quit
  • Previous by thread: Re: Subroutines
  • Next by thread: Re: Subroutines
  • Index(es):
    • Date
    • Thread