Invoking a Core Services function?

I’m brand new to ASOC. I’ve read the tutorials and as much of the documentation as I can find, but I still don’t know how to do something fairly basic.

I would like to make a Core Services function call from AppleScript within my ASOC app. Here’s an example of a Core Services function that I want to invoke:

Is there a way to do this?

I tried this, but it failed:

Thanks in advance.

Well, I figured out an indirect way of doing this.

First, I created a utility class in a file called Util.h:

Then, I wrote its implementation in Util.m:

Then, I add this line to my AppDelegate script:

property Util : class "Util" of current application

And finally, I can then call the function inside of this AppDelegate as follows:

Util's updateActivity()

This seems to work, but I’d still like to know if there’s a way to make a direct call to that Core Services function from the ASOC AppleScript code, without having to create that auxiliary class.

Thanks again in advance.