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

Re: Running Subroutines from Other Scripts


  • Subject: Re: Running Subroutines from Other Scripts
  • From: Andy Wylie <email@hidden>
  • Date: Sat, 24 Aug 2002 09:06:31 +1200

on Fri, 23 Aug 2002 14:11:50 -0400 Adam Backstrom wrote:

>Hey everyone,
>
>I'm working on a series of AppleScripts written in AppleScript Studio.
>For the sake of organization, I would like to split up the code into
>several scripts. The problem is, I can't find the correct syntax for
>telling an outside script to run a subroutine. Is this functionality
>supported?
>
I don't know about AS Studio or X but this works here...

--master
run script (choose file) with parameters {1, "woo"}

--slave
on run (params)
if params's item 1 = 1 then sayit(params's item 2)
end run

on sayit(blah)
say blah
end sayit

--most people seem to use 'load script'...

set x to load script (choose file)
tell x to sayit("woo")
_____________________________ Andy
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Running Subroutines from Other Scripts
  • Next by Date: Re: [Apple List Admin] Re: Clarification (was: Re: AppleScript and international characters)
  • Previous by thread: Re: Running Subroutines from Other Scripts
  • Next by thread: Re: Running Subroutines from Other Scripts
  • Index(es):
    • Date
    • Thread