ui.click_popup_button
Overview
- Clicks a button on an opened popup through the normal path (closes the popup, runs the bound script and delegate). 'index' is a BUTTON index within one popup - it is NOT the 'index' field of ui.get_blocking's popups[] array. The only popup selector is popup_id; without it the first enumerated open popup is used (enumeration order is UObject creation order, not z-order). Prefer list_key over index: the button order in Popup.json can change. A single positional argument binds to popup_id, so 'ui.click_popup_button NoticeBirth' selects that popup. A non-numeric index is rejected instead of being coerced to 0. Use ui.get_blocking to discover popup ids and button list_keys.
Metadata
| Field | Value |
|---|---|
| Display | Click Popup Button |
| Category | ui |
| Access | UserCheat |
| Scope | B1Standalone |
| Tags | Experimental |
| Aliases | — |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| popup_id | name | no | — | Id of the popup to act on. Omit to use the first enumerated open popup. |
| list_key | string | no | — | ButtonDetail.ListKey of the button to click (e.g. 'btn0'). Takes precedence over index. |
| index | int | no | 0 | Button index within the popup to click when list_key is not given. Must be a non-negative integer |
Usage
await inzoi.cli.execute('ui.click_popup_button', {
popup_id: '', // optional
list_key: '', // optional
index: 0, // optional
});