
-----------------------------------
Bobby321
Tue Jan 17, 2012 1:09 pm

Making a reset button work proplerly
-----------------------------------
What is it you are trying to achieve?

Making a thermometer that changes temperature from Fahrenheit  to Celsius and repeats. 

What is the problem you are having?
The program repeats by clicking the orange button and most of the time it works but sometimes it takes many clicks to reset it. I need help to make it repeat with only 1 click every time.

Describe what you have tried to solve this problem
Try making a GUI button, but still no help.

Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)




procedure drawrectangle
    %screen formatting
    setscreen ("graphics:800;400")
    %orange button
    var number : int
    var rangeX, rangeY, button : int
    cls
    drawfillbox (200, 50, 250, 100, 42)
    %keyboard input
    put "Enter your temperature in farenheit from -4 to 68"
    get number
    put "Your temperature in celcius is:", (5 / 9) * (number - 32);
    put "Click on the orange box to repeat"


    %Mouse input
    loop
        mousewhere (rangeX, rangeY, button)
        if (rangeX >= 200 and rangeX = 50 and rangeY 