• 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
Passing variables between scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Passing variables between scripts


  • Subject: Passing variables between scripts
  • From: Stephen Swift <email@hidden>
  • Date: Thu, 19 Jun 2003 05:48:27 -0400

I have a front script that can run many other scripts (chosen by name). The
problem is that I have a variable that I need to pass to the script from the
front script. I have thought of two options:

set the_script to load script "test.scpt"
set the_script's foo to bar
run the_script

The second option would use the run script command.

run script script -- the script text
[with parameters a list of anything] -- list of parameters

I would assume parameters would be a good way to pass data, but I am a bit
confused as to how this would be done.

Run script "test.scpt" with parameters {"some string"}

The problem I think is that I don't know how to write test.scpt so it
accepts the parameters. Would I use a subroutine, or can my parameter be
only a list of variables? Anyone who has done this, I would love to hear
from you.

-Stephen
_______________________________________________
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.

  • Follow-Ups:
    • Re: Passing variables between scripts
      • From: Richard Morton <email@hidden>
    • Re: Passing variables between scripts
      • From: John Delacour <email@hidden>
  • Prev by Date: Re: Breaking up a long string
  • Next by Date: Re: Path string interpretation with 'as alias'
  • Previous by thread: Re: Breaking up a long string
  • Next by thread: Re: Passing variables between scripts
  • Index(es):
    • Date
    • Thread