MACSCRPT Archives

December 2009

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
John Delacour <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Mon, 14 Dec 2009 00:22:14 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (31 lines)
At 14:17 +0000 13/12/09, Chris Harbinson wrote:

>[...] It's getting myWonderfulList from script 1 to script 2 without 
>too much clumsiness that's puzzling me at the moment.

If you make myWonderfulList a property of the first script and run it:

    property _name : "n"
    property _age : "0"
    set _dd to display dialog "What's your name?" default answer ""
    set _name to text returned of _dd
    set _dd to display dialog "How old are you?" default answer ""
    set _age to text returned of _dd

then the values assigned to your variable(s) will be stored as a 
property of the script and when you load the first script into the 
second and run this:

    set _scriptsfolder to path to scripts folder as Unicode text
    set _script1path to _scriptsfolder & "Applications:Smile:script_1"
    set _script1 to load script alias _script1path
    display dialog _name of _script1

you will have these values available.

Script 1 will need to be run from a scripts menu and not from the 
open window, at least in Smile.  Otherwise the properties will not be 
stored.

JD

ATOM RSS1 RSS2