Fermat
Search
K
Comment on page

Blocks

You can have a programmatic reference of any block by setting a variable to the id value of the block: set block to [BLOCK-ID]. Besides, we have direct access to the properties from the block we are editing its behaviour through the me variable.
Furthermore, we can check or modify the properties of any block (e.g. value, background...). To do so, we just have to add a dot between the variable name and the property (e.g. text properties) name block.value or me.value.
Alternatively, we can use a more english-like syntax without relying on the dot notation value of me.
Here, you can find some examples:
set me.value to "Hello World!" -- me is a block-button that displays "Hello World!"
set block to 1c4b8770-5ebe-4c73-88e0-e440e8370f0a -- block-text
set background of block to "red" -- set the background color to red
set me.value to background of block