Change number box with key

This example shows how you can increase or decrease the number in a number box each time the up or down arrow keys are pressed. The incdec object is made to be connected to the integer number box in the manner shown here. The messages inc and dec to incdec will increment and decrement the attached number box.

Count with incdec

The incdec object is a user interface object with an up arrow and a down arrow. It stores a number, and it also has an internal step size (increment attribute), which is 1 by default. When you click on the up or down arrow, incdec will increase or decrease its internal value by the increment, and send out the number.