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

Re: Library Question


  • Subject: Re: Library Question
  • From: Bill White <email@hidden>
  • Date: Fri, 18 Oct 2002 12:40:11 -0400

Steve,

Use "return":

to displayThisValue(thisValue)

set thisValue to (thisValue as string) & " is a movie."

return thisValue

end displayThisValue

Then using your same setup:

runScript's displayValue("iBrotha") --> "iBrotha is a movie."

HTH,

Bill

> 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?
_______________________________________________
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: applescript-users digest, Vol 3 #981 - 16 msgs
  • Next by Date: Re: screen size in OS X
  • Previous by thread: Library Question
  • Next by thread: Re: Library Question
  • Index(es):
    • Date
    • Thread