• 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 a script library from within Filemaker Pro 6
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running a script library from within Filemaker Pro 6


  • Subject: Re: Running a script library from within Filemaker Pro 6
  • From: Axel Luttgens <email@hidden>
  • Date: Tue, 20 May 2008 10:58:29 +0200

On 20 mai 08, at 05:15, Jim Skibbie wrote:

OK, now I have a follow-up question regarding variables like local, globals,
properties and handlers and how they work when loading or running scripts
from within scripts.


[...]

What are the rules when it comes to what variables/handlers can pass from
one script to the next. It looks to me like none from the scenario below.
I’m assuming to get the handler from ThisScript to be available in
ThatScript, that I would need to load it into ThatScript instead of loading
it into the MainScript? I’m also assuming that everything needs to be self
contained in the script that is being asked to run and that the properties
from MainScript don’t transfer from one script to another even though they
are being called by the MainScript?


[...]

MainScript:

property foo : "mainvalue"

set ThisScript to load script file ((alias "Macintosh
HD:Users:jim:Desktop:ThisScript.scpt" as string))

set ThatScript to run script (alias "Macintosh
HD:Users:jim:Desktop:ThatScript.scpt")

--tell ThatScript to run

set x to ThisScript's thisresult(" World")

Hello Jim,

There must be a typo here...
Since ThatScript makes use of ThisScript, I guess that you wanted for the demonstration purpose to invoke ThatScript.
But, as you have written it, ThatScript only has a run handler.
So, instead of the above statement, this should be what you meant:


	tell ThatScript to run

But then, everything seems to be working as intended...
And this is rather annoying wrt to your (indeed fundamental) questions, as their purpose now seem to somewhat vanish.
Perhaps could you try to build another example illustrating the kind of difficulties you are encountering?


ThisScript:
property foo : "thisvalue"

on thisresult(x)
   set y to "Hello World " & foo & x
   return y
end thisresult


ThatScript: property foo : "foo"

on run
   set z to ThisScript's thisresult("Hello")
   set z to z & " " & foo
   activate
   display dialog z
end run


Well, feeling as if I couldn't be very helpful here,
Axel _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: Running a script library from within Filemaker Pro 6 (From: Jim Skibbie <email@hidden>)

  • Prev by Date: Re: Circle Slash on Applescript apps when copying with rsync
  • Next by Date: reading a property list item
  • Previous by thread: Re: Running a script library from within Filemaker Pro 6
  • Next by thread: Re: Re: Running a script library from within Filemaker Pro 6
  • Index(es):
    • Date
    • Thread