Hi, I am trying to create a button in the GUI where random numbers appear in the output as the user holds down a button.
I have used a toggle button with the code:
This code works, but the output runs as the user presses the button and carries on until the button is pressed again.
How do i create a button where the code only loops while the button is being pressed down? As soon as the mouse click is released, the code stops executing