Patch Editor for Script

Guys, with a lot of work I created a script that compares dates, times, etc. (Although it’s super simple for those who know the basics of programming lol)
But now I want to create a way that the input information comes from the patch editor, I know I have to use Patches.outputs. But can someone give me some information, an example?

You need to add a value to the “to script” entry in the script properties.

Then in the script, you can get the value like this:

const aBooleanSignalFromPatches = await Patches.outputs.getBoolean('aBoolean')

If you want a more flexible workflow (without needing to define the “to script” value manually every time), you can try embedding your script in a block, then use the inputs and outputs from there. It’s a similar workflow to set block outputs from script, but you would use the Blocks module.