Quote:
button:1/2/.../5/<virtual click>
Similar to [modifier], [button] allows your macro to respond differently based on which mouse button is being used to activate the macro. Button numbers 1-5 correspond to left, right, middle, button 4, and button 5. If your macro is activated by a keybinding, [button:1] will always be true. As an example, here is the macro I use for mounting:
#show Swift Green Mechanostrider
/userandom [nobutton:2, flyable, nomounted] Ebon Gryphon; [nomounted] Black Battlestrider, Swift Green Mechanostrider
/dismount [noflying] [button:2]
Behavior when not mounted: left-clicking will pick Ebon Gryphon if it can be used (flyable), otherwise it will randomly pick the Black Battlestrider or the Swift Green Mechanostrider. Right-clicking will always pick one of the mechachickens.