Build Your First Dialog
This page builds a small dialog in the Block Editor and uses its answers.
In the Block Editor, the dialog blocks need Pro. Anyone can answer a dialog.
1. Add the dialog
Open the Dialog category and drag show dialog to the start of your macro. It comes with an example inside: a line of text, a checkbox and a number input. Everything inside show dialog appears in the dialog, in that order.
2. Add your questions
The Dialog Components category has every question type. Drag them inside show dialog and change their text. Each question gets its own id by itself; you only need the id to read the answer.
3. Use the answers
Drag answer of from the Dialog category wherever a value goes, and pick the question in its dropdown. Put it after show dialog: the answers exist once the user presses OK.
This macro clicks as many times as the user typed in Runs, and presses the reward button only when Collect daily rewards is ticked.
| Question | answer of gives | Use it in |
|---|---|---|
| checkbox | true or false | if |
| text input | text | text blocks, = |
| number input, slider | a number | repeat, math, waits |
| options, dropdown | the id of the chosen option | = with that id |
| tap picker | a Point | click at a point |
| tap list picker | a list of Points | for each item in list |
| touch recorder | a record name | play touch record |
Defaults
A default is the answer before the user changes anything.
- number input, slider: the default field.
- checkbox, text input, options: add default from the block's gear.
- dropdown: default option.
- tap picker: tick default and type x and y.
- touch recorder: default record, the name of one of your touch records.
Once the user has answered, their answer is used instead of the default, on every later run.
Ids
Every question needs its own id, because the app saves each answer under it.
- A question you drag in, paste or duplicate gets the next free id.
- If you type an id that another question already uses, the editor warns you and offers a free one.
- Options only need different ids within their own list.
Answers are saved per macro, so the same id in two different macros is fine.
Press OK by itself
In the gear of show dialog, add auto OK. The dialog then presses OK by itself after the time you set, as long as every question that needs an answer has one. 0 never presses it.
If the user presses Cancel
Cancel stops the macro. Nothing after show dialog runs, and the answers are not saved.