Guide · PuppyMacro 1.25.0

Library

The Library keeps the pieces of macros that work, to use them again in other macros: how to find a button in your accounting app, where each slot of a game's inventory is, a few steps that save a file. Each piece is a component, and components are kept in collections, one for each app and screen (for example Diablo IV 5120×1440 or Excel). Select Library on the Macros page to open it.

The Library window with the collection Sample: Notepad and its component Save the file
The Library: collections on the left, their components on the right.

Save a piece as a component

  1. In the macro editor, select the rows that work together, one after the other in the same list.
  2. Select Save as component… in ⋯ or in the right-click menu.
  3. Give it a Name (what you read in the Library and in the macro), choose What it does and the Collection: one you have, or New collection with its Kind of app, its App (the app's .exe, empty for any app) and the Screen PuppyMacro reads from your monitor. The Concept (in English, filled in from the name) and the Description are what AI apps search by.
  4. Select Save. The component is in the Library at once, and the selected rows become one row linked to it.

A component holds the actions as they are, also an If with its Then and Else, and other linked components. A click "where … was found" uses a condition inside the same component: when the selected rows use a place found by a condition outside them, Save as component makes it a parameter, and the new row passes that place on.

Use a component in a macro

In the macro editor, select Component (the + button next to Condition). The Library opens: check the components you want and select Add linked. Each one comes in as a linked row: one greyed line with the component's name, its collection and how many actions it has.

A macro that links a component the Library doesn't have any more can't play and can't be saved until you delete that row or link another component.

Parameters: one component for every slot

A component can take values from the row that calls it, its parameters. A game's inventory with 33 slots needs one component, Strip one slot, with a parameter Slot: each of the 33 rows gives its own slot. When you fix the component, all 33 rows play the fix.

Grids: cells all alike in rows

An inventory, a keypad, a gallery of pictures or a sheet's cells are cells all alike, in rows and columns the same distance apart. A Grid parameter describes them once, and a call then only says which cell: Slot 23 instead of its point.

Can be used as a condition with What it finds (one of its conditions) makes the component a condition too: in an If, Add condition › Condition from component. It is true when the condition it finds is, checked as any condition with the If's wait, and a click "where … was found" goes where it found it.

When a change to a component's parameters affects the rows that call it (a new parameter every call gives, one removed, another type), Save shows This change updates the calls: one value for all the calls that need it, the parameters taken out and the macros that change. Update and save saves the component and the calls together; if something can't be saved, nothing changes. Renaming a parameter keeps each call's value.

The Library

The Library shows the collections on the left and the components of the selected one on the right, each with its name, the name AI apps search by (for example game-diablo_iv-find-rare_item_in_slot) and how many macros and other components use it ("Used in 2 macros and 1 component", or "Not used"). The window of a linked row names them. Search finds components by any of their names and descriptions. A selected component shows what it plays and:

⋯ next to a collection renames or deletes it. Delete collection is off while a macro links one of its components or a component of another collection calls one, and its tooltip names them. The Library can't change while a loop or macro is running.

Share a collection

Export collection saves a collection, whole, in a .puppyitems file with its images, and the collections its components call. A macro exported from its card or with Export takes the collections it links along. On another PC, Import (in the Library or in the title bar's ⋯) adds the collections it doesn't have yet, then the chosen items.

The Library and AI apps

AI apps search the Library before building a macro and link what already works, and save the pieces that work as components, with names in English they search by later. So the more you build with your AI app, the more your Library knows about your apps. See AI apps.