Re: Library Question
Re: Library Question
- Subject: Re: Library Question
- From: "Marc K. Myers" <email@hidden>
- Date: Fri, 18 Oct 2002 14:02:01 -0400
Subject: Library Question
Date: Fri, 18 Oct 2002 11:48:45 -0400
From: "Steve Suranie" <email@hidden>
To: <email@hidden>
OK, so I created a simple method to display a variable's value:
to displayThisValue(thisValue)
display dialog thisValue
end displayThisValue
and then another simple script to open the library script and pass a
value to it
set theLibPath to "System:desktop folder:AppleScripts:lib:"
set theScriptPath to theLibPath & "displayValueScript"
set runScript to (load script theScriptPath)
runScript's displayValue("iBrotha")
and to my ever lasting joy it worked.
The excitement has passed and I now have another question: How would I
pass a value back from the library script to my main script.
so on my library script, if instead of displaying thisValue I wanted
to add to it, such as:
set thisValue to (thisValue as string) & " is a movie."
and return that value to my calling script how would I do it?
Your handler would look like this:
to displayValue(theValue)
return "" & theValue & " is a movie."
end displayValue
You'd put the result into a variable like this:
set varX to runScript's displayValue("iBrotha")
Marc [10/18/02 2:01:23 PM]
_______________________________________________
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.