xojoscript tutorials?

Is there any tutorials going more in depth with xojoscript?

In particular, I’m trying to figure out if I can expose methods that a script can then call.

Not local inside the app, but from a script loaded at runtime, which can then call the methods I’m adding and trigger functions i add.

Is that possible?

The scripts you load / run will execute within a"Context" (and you can make as many context objects as you want)
So the context object can expose methods that the scripts can call.

Its how IDE scripting works.
The IDE has a context that each of the scripts is loaded into & executed in - and that context exposes functions that the scripts can use. The functions listed in the IDE scripting documentation are all ones provided by the IDE Context object that scripts can use.

What have you looked at so far? XojoScript is covered in User Guide Book 3: Framework (Advanced chapter) and there are some examples in the Advanced folder.

Yeah I found that now, guess I go for F1 by habit.

I got most of it right by diving in…

I looked at the advanced/xojoscript projects but missed that I needed to set the context, so the methods I added and called from the script wasn’t getting called.

Got the context set and… this is pretty cool :smiley: