
-----------------------------------
skillspeed
Wed Jan 18, 2012 5:01 pm

Is it possible to make a button that when clicked the program exits, and how can it be done?
-----------------------------------
What is it you are trying to achieve?

I have an isp and I am trying to make a button that when clicked exits the program, what the program is doesent matter I just need the program to exit when the button is clicked. 

What is the problem you are having?

I am not sure how you go about doing this, I dont know if there is a command that does this, etcDescribe what you have tried to solve this problem



Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)


This is all I know about making buttons:


var x, y, bnum, bud : int

drawfillbox ( 100, 280, 200, 310, 4)
drawfillbox ( 100, 240, 200, 270, 2)
drawfillbox (100, 200, 200, 230, 1)

if x >= 100 and x = 280 and y = 100 and x = 240 and y = 100 and x = 200 and y = exitX and mouseX = exitY and mouseY = exitX and mouseX = exitY and mouseY :(

-----------------------------------
chipanpriest
Fri Jan 20, 2012 12:30 pm

Re: Is it possible to make a button that when clicked the program exits, and how can it be done?
-----------------------------------

var window : int := Window.Open ("graphics: 200;200")
var exitButton : boolean := false
loop
     % Do Stuff
     % If you clicked inside the exit button
     if mouseX >= exitX and mouseX = exitY and mouseY 