Use Applescript to Pass Values to an ASOC App

Hi all,

Newbie here, so first, thanks to everyone here for a great site!

My first ASOC project is to update (ie re-write) an old AppleScript Studio progress window app I have that I use in conjunction with various slow-running Applescripts. It’s easy to control the display in the Applescript Studio app with Applescript commands like: tell window of application to set contents of progress indicator to x.

After reading the terrific tutorials here, I’ve been able to make the basic bindings between the properties in the script and the fields in the window. I’ve tested text field updating with temporary buttons, etc., so seem to have most of the basic functionality sorted.

My question now is: how can I pass values (string and numeric) to my app from an Applescript so that I can update the message line and progress bar? My first thought was that maybe my delegate’s script properties were addressable from without. It seems that would be too easy! I’m stumped but know someone here will have the answer.

Cheers,

Quentin

Alas, I suspect it means making the app scriptable, which is a bit of an exercise.

Is there some reason you can’t just rework the AppleScripts into AppleScriptObjC apps?

I feared as much.

The way I have it in ASS, I can re-use my little app as and when I write new Applescripts. I like the fact that it is portable, modular. I have written a few scripts over the years that start out processing small file hierarchies which just get bigger and bigger. It’s easy then to include a few extra lines in the script to display the progress window.

I’ve had a brief look at the documentation for scripting and it looks way over my head at the moment. Shame.

Thanks anyway,

Quentin

PS Enjoying your e-book!

You should be able to make an ASObjC template that you can reuse easily enough. You will still want to debug elsewhere, but the consolation prize is that ASObjC apps run a lot faster than AS applets.

Glad you’re enjoying the book!

Yes, I’ll certainly have a play with this. I can only learn something…:slight_smile: