
-----------------------------------
Carey
Fri May 12, 2006 10:22 am

Quit with exe files
-----------------------------------
does anybody know why the quit command doesn't work in exe files?

-----------------------------------
do_pete
Fri May 12, 2006 11:30 am


-----------------------------------
Don't use quits. Use exits and check the "Immediatly close run window(s)" box when compiling.

-----------------------------------
Carey
Fri May 12, 2006 12:29 pm


-----------------------------------
it says that the "exit" command needs to be in a for or loop statement

-----------------------------------
ZeroPaladn
Fri May 12, 2006 12:34 pm


-----------------------------------
exactly. if your code is in a loop (which it usually is) then there should be no problem. Just stuff the exit inside a loop where you want the program to exit the loop. for example...
loop
put "hi!"
end loop

this is simple. keeps says hi untill you cant stand it anymore. and then some. Now with the exit statement...

loop
put "hi"
exit
end loop

the exit statement, when used in a loop, exits the current loop, and begins on the code after the end loop. if there is no code, then the program ends. does this clear things up?

-----------------------------------
Clayton
Fri May 12, 2006 4:18 pm


-----------------------------------
i think what he wants is for the program to close the run window when it ends, instead of the default

"Program Name-Finished"

and the window is still open, correct me if im wrong though :D

-----------------------------------
[Gandalf]
Fri May 12, 2006 4:31 pm


-----------------------------------
Yeah, the program will close if you exit the main loop (ie. no more statements to execute) and you select the "Immediatly close run window(s)" option when compiling.

An alternative you have, if you are not intending to compile your program, is to use Window.Open() with Window.Close().  I'll leave it up to you to figure out where to learn how to use those.
