Skip to main content

What Is a Dialog?

A dialog asks the person running your macro a few questions before it starts: how many runs, which mode, where the Attack button is on their screen. Your macro reads the answers and behaves accordingly.

A macro dialog the first time it opens

The app remembers the answers for each macro. The next time the dialog opens, the answers are already filled in, so the user only presses OK, or you can skip the dialog completely once everything is answered (see Every Run or Only When Needed).

A dialog is also the only way users can adapt a macro they can't edit, such as one from the Store, to their own phone.

What you can ask​

BlockIn LuaThe user...Your macro gets
textTextViewreads a line of textnothing
checkboxCheckBoxticks a boxtrue or false
text inputEditTexttypes texttext
number inputNumberInputtypes a numbera number
sliderSliderslides to a numbera number
optionsRadioGroup + RadioButtonpicks one choicethe id of the chosen option
dropdownRadioGroup:showAsDropdown()picks one choice from a listthe id of the chosen option
tap pickerTapPickertaps a spot on their own screena Point
tap list pickerTapListPickertaps several spots in ordera list of Points
touch recorderGestureRecorderplays a routine oncea record name for play touch record

See Question Types for each one.

Arranging the questions​

BlockIn LuaWhat it does
pagePageSplits a long dialog into pages. The first time, they show one at a time; after that, as tabs.
sectionSectionA titled group the user can fold, for example "Advanced".
next items side by side / next items stackedRow / ColumnPuts the items after it next to each other, or back under each other.
show whenshowWhen / hideWhenShows a question only while a checkbox or choice has a certain answer.

See Pages, Sections and Rows and Show a Question Only When It Matters.

Ids​

Every question has an id, a number. You read an answer by its id, and the app saves it under that id, so each question in a macro needs its own. Options have ids too, which only need to be different within their own list.

In the Block Editor you rarely type them yourself: a question you drag in gets the next free id, and if you type an id that another question already uses, the editor warns you and offers a free one.

Next​