I have certain problem. I want to change value of variable \'x\' with one of two buttons. Program is doing several actions and after them I want program to wait for user\'s clic