just finished the final grid ops for the 2.3 version (iām hoping to add more but saving that for future versions). these should be helpful for using buttons to define loop points / simple scales etc.
G.GBTN.C group
get the count of all currently pressed buttons in a group
G.GBTN.I group index
get the id of a currently pressed button by index (index is 0-based)
G.GBTN.W group
get the width of a block represented by currently pressed buttons in a group
G.GBTN.H group
get the height of a block represented by currently pressed buttons in a group
G.GBTN.X1 group
get x coordinate for the leftmost pressed button in a group
G.GBTN.X2 group
get x coordinate for the rightmost pressed button in a group
G.GBTN.Y1 group
get y coordinate for the highest pressed button in a group
G.GBTN.Y2 group
get y coordinate for the lowest pressed button in a group