Simulating one click button action in grasshopper?

I want create a button that will update the value of an integer by 1 when I click it.
e.g. let say a = 1
after button click: a = 2
after another button click: a = 3

this is time independent. Is there any way I can achieve this?

I’m also searching for another workaround. Is there a way I can create an excel like table within grasshopper? I’m thinking of increasing number of rows in that table and using count of rows instead of using button for increment.

Thank you

Hi @user3036
Here’s a tiny script for this: (5.7 KB)


Hi Daniel,

Thank you. That’s what I wanted.