How to use LUA GUI to write to automation volume

Hi, I’m trying to figure out what would be the most convenient way of writing to a specific track automation volume via the LUA GUI. I’m only thinking of steps for on, and steps for off (regular volume, either total silence, or “regular volume”).

Why do you want to do this with the Lua GUI?

When I want to automate the muting of a track I add a gainer device, set it to -inf, and then record mouse clicks to turn it on or off.

Because writing to the automation from LUA-scripting would also let me change things quicker. i guess a gainer device would also be nice, but thing is, i’d prefer to see them visually left-to-right, much like in the midi-clip-envelope editing in ableton live. but since drawing automation step by step is pretty horrible on mouse, i’d prefer to tick specific rows on and specific rows off, and maybe commit those to the pattern track fx, and then commit a different set to another pattern’s track fx.

for more versatility and at leats an illusion of control…