Make a button that contains OnPress="(command) (command)" You have to repeat it, because, well, you do.

You can find a list of commands around here somewhere, but attack is
/autoattack on and inventory is
/show_window inventory.Inventory.
P.S. oh and don't include the /
P.P.S. Here's an example OnHoverIn="autoattack=(off) autoattack=(off) useability=(Sneak) useability=(Sneak)"