Running Applescript

I’m trying to make a program that just has several buttons that each run a different applescript file that modifies a setting in another program. When I run these files in the applescript editor, everything works as expected. When I try to get Xojo to run them, I get no error, but nothing seems to happen. I’m using the instructions here: https://documentation.xojo.com/topics/macos/using_applescripts_in_your_app.html

I’ve imported the applescript script_222.scpt. I’ve created a window1, and inserted several buttons. In each button’s action method, I call it like so, but with a different script name for each button:

script_222
window1.title=“Script - 222”

When I click it, the window title changes, but the other program doesn’t get the message.
If I open script_222.scpt in the apple script editor and run it, it works.

Thanks for any help

It would be helpful if you list which version(s) of macOS where you need this to work. I don’t use Applescript myself so can’t give you a better answer, but I have seen some previous forum posts that suggest Apple is making it increasingly difficult for user apps to run Applescript.

Also mention if you need this to work in an app submitted to the Mac Apple Store or not. I think you will get better suggestions when you mention the environment(s) where it needs to work. I mostly ignore those threads since I don’t use Applescript myself.

Sorry, I’m running macOS Mojave 10.14.6
I do not need to submit this to the Apple Store. I’m using a commercial application that uses applescript to tune internal variables, and I need an easy way to quickly switch between different values.
I have a workaround for this - I’ve saved each value into a script and compiled them into an app, and I have a folder full of them that I can click on. This works, but I’d rather have a single smaller xojo window with buttons I can click that will keep track of what the value is currently set to, but I can’t get xojo to run the scripts.

Thanks