Passing / Setting parameters from external AS

Hi!
I´m new to AS and trying to understand the bits and parts so sorry if this is a silly question…

I´m using ASOC to extend GUI functions to FileMaker Pro clients. I have written a simple ASOC app that shows a HUD Window (NSWindow) containing a TableView loaded with record data from FileMaker (Thank you Craig Williams for a great tutorial on tableviews!).

In order to make my app work well I need to load it with some parameters or values from FileMaker whenever the app is launched or call on. Stuff like which recordId is active on what layout and so on. A simple way that “works” is to make my ASOC-app poll the most resent info from FileMakers AS-handlers. That solves stuff like current record ID and layoutnames, but not custom parameters like if I want a param telling my ASOC-app what window to show… and so on.

Is it possible to set property values or global varibles inside my launched ASOC-app from a external applescript, such as FileMakers “Perform Applescript”-scriptstep?

Or alternatively, when FileMakers “Perform Applescript”-scriptstep tells my ASOC-app to activate, can I send like a ASRecord (key-value-array) as a initial param that my ASOC-app can call on in

on applicationWillFinishLaunching_(aNotification)

or similar.

Can I “publish” a method in my ASOC-app as “public” so that FileMakers “Perform Applescript”-scriptstep can call a setter method and pass values that way. I tried

Tell myFirstApp to setValue("hello world") end tell

but it does not seem to work.

Does this make any sense? Any ideas?
Thanks in advance!

You will need to make your app scriptable. It’s not hard, but it does involve quite a few steps. Here are a couple of threads to get you started:

macscripter.net/viewtopic.php?id=36000
macscripter.net/viewtopic.php?id=36878

Ahh ofcourse… that makes sense. On of my biggest problems is that I´m not famliar with the correct names of things in AS. That makes googling stuff harder. I´ll make my app scriptable tonight =)

Thanks!