Console Client
Documentation
Dashboard
Everyday Tools

Macro steps: inventory, menus and dialogs

Click slots with the right numbers, wait for menus, move items in bulk, and answer server dialogs on Java 1.21.6 and newer.

How slots are numbered

Every slot step uses the numbering of the window that is open at that moment.

WindowNumbers
Nothing open (player inventory)0 to 8 are the crafting grid and armour (armour is 5 to 8), 9 to 35 the main inventory, 36 to 44 the hotbar, and 45 the off hand on Java.
A menu or container is openThe menu’s own slots come first, 0 up to its size minus one, then your main inventory, then your hotbar. A single chest has 27 menu slots, a large chest 54.

Every slot field in the builder has a Live example panel under it. Pick one of your connected accounts and the panel draws the menu that account has open, or its player inventory when nothing is open, with the exact numbers. Click a cell to write that number into the field. Nothing is sent to the account; the panel only reads. Set Hotbar shows a hotbar bar the same way, numbered 0 to 8.

Open a menu and click through it

  1. Open it

    Add Type Command with the command that opens the menu, such as /shop.

  2. Wait for it

    Add Wait for Window. It continues as soon as a container opens, or gives up after the timeout (500 to 120,000 ms). This beats a fixed wait on a laggy server.

  3. Click a slot

    Add Click GUI Slot with the slot number, the mouse button, and Shift Click when the menu expects it. Click N times (1 to 200) with a Delay between clicks repeats the same click, for example to buy a stack several times.

  4. Wait for the result

    Where a menu fills a slot after a moment, add Wait for Slot: the slot number, an optional item name, a minimum count, a timeout (100 to 300,000 ms), and what to do on timeout. It polls the open menu until the slot holds what you asked for.

  5. Close it

    Add Close Window, which presses Escape.

Read Slot stores what a slot holds into a variable so a later If step can check the price or the name; see variables, conditions and loops.

Move and drop items in bulk

StepSettings
Shift-Click All MatchingShift-clicks every slot in a range whose item matches the name, with a delay between clicks (20 to 2000 ms). With a shop or deliver menu open, this dumps everything matching into it. The default range 9 to 44 skips armour.
Swap SlotsSwaps the contents of two slots.
Drop ItemDrops one item, or the whole stack, from a slot.
Drop Held ItemDrops what the selected hotbar slot holds: the whole stack, like Ctrl+Q, or a single item like Q.
Drop All ItemsEmpties the inventory with a delay between drops, optionally including armour, or limited to one item id.
Find SlotSearches for an item by name inside a slot range, preferring the hotbar, and stores the slot number, whether it was found, the name, and the count in a variable. Tick the container option to search the open menu instead of the player inventory.

Server dialogs (Java 1.21.6 and newer)

Newer servers, DonutSMP included, open dialogs instead of chest menus: a titled screen with text, inputs such as a text box, an on/off toggle, an option cycler or a slider, and buttons. Buttons are numbered 1, 2, 3 in reading order, top left first, with the Back, OK, Yes and No buttons at the bottom counted last. Inputs are numbered 1, 2, 3 from the top. The Live example under these steps shows the numbers on the dialog the account has open.

StepSettings
Wait for DialogWaits until a dialog opens, optionally one whose title contains your text, up to the timeout (500 to 120,000 ms).
Dialog InputFills an input found by number, by its label text, or by the key the plugin gave it. Text box: any text, tokens allowed. Toggle: on or off. Option cycler: the option id or the text it shows. Slider: a number.
Dialog ButtonPresses a button found by number or by label text, and runs what the button does: a command, a custom action with the current input values, or the next dialog.
Close DialogPresses Escape on the open dialog.

The If, Wait Until Condition, and Switch steps can test whether a dialog is open and read its title or body text. Bedrock accounts and Java accounts on older versions skip dialog steps with a console line.

Example: sell through a shop menu

A typical sell loop, with slot numbers you replace with your server’s:

  1. Open the shop

    Type Command /shop, then Wait for Window 5000.

  2. Navigate

    Click GUI Slot for the category, then for the item, then for the quantity.

  3. Sell

    Shift-Click All Matching with the item name, slots 9 to 44, so every stack moves into the menu.

  4. Close and repeat

    Close Window, then set Forever on with a few seconds Between loops.

Need a hand?

Check the troubleshooting guide or return to all guides.