Computer Science Canada Program Run Loop Problem! HELP! |
Author: | Krocker [ Tue May 31, 2011 11:57 am ] | ||
Post subject: | Program Run Loop Problem! HELP! | ||
What is it you are trying to achieve? Have my program loop when it is done What is the problem you are having? not able to get the whole program to loop correctly Describe what you have tried to solve this problem tried to put loops all over the place! Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
Please specify what version of Turing you are using <Answer Here> |
Author: | Zren [ Tue May 31, 2011 1:07 pm ] |
Post subject: | RE:Program Run Loop Problem! HELP! |
Not entirely sure but you might need to check out GUI.ResetQuit. You might also need to destroy the buttons before remaking them again the second time through the loop. |
Author: | XZNZ [ Tue May 31, 2011 3:06 pm ] |
Post subject: | RE:Program Run Loop Problem! HELP! |
Quote: if cb2Status then File.Delete ("C:/Nexon/Combat Arms/Uploader.exe") if Error.Last = eNoError then else var winID : int winID := Window.Open ("position:center;center,graphics:300;100") View.Set ("title:ERROR") put "Uploader Already Deleted." delay (4000) Window.Close (winID) end if else its not the full code an end if is missing at last plz can u post full code. |
Author: | Krocker [ Tue May 31, 2011 3:27 pm ] |
Post subject: | RE:Program Run Loop Problem! HELP! |
import GUI View.Set ("graphics:500;200,nobuttonbar") View.Set ("title:-KDB-CLEANER") GUI.SetBackgroundColor (grey) procedure FileName (status : boolean) end FileName var cb1 : int := GUI.CreateCheckBox (10, 10, "Black Cipher", FileName) var cb2 : int := GUI.CreateCheckBoxFull (120, 10, "Uploader", FileName, GUI.LEFT, '2') var font1 : int font1 := Font.New ("Ariel:18x12:bold") Font.Draw ("-KDB-CLEANER", 10, 170, font1, white) var quitBtn : int := GUI.CreateButton (400, 10, 0, "Clean", GUI.Quit) GUI.ResetQuit loop exit when GUI.ProcessEvent end loop var cb1Status : boolean := GUI.GetCheckBox (cb1) var cb2Status : boolean := GUI.GetCheckBox (cb2) if cb1Status then File.Delete ("C:/Nexon/Combat Arms/BlackCipher/NexonGuard.log") if Error.Last = eNoError then else var winID : int winID := Window.Open ("position:center;center,graphics:300;100") View.Set ("title:ERROR") put "Black Cipher Already Deleted." delay (4000) Window.Close (winID) end if Dir.Delete ("C:/Nexon/Combat Arms/BlackCipher") if Error.Last = eNoError then else end if else end if if cb2Status then File.Delete ("C:/Nexon/Combat Arms/Uploader.exe") if Error.Last = eNoError then else var winID : int winID := Window.Open ("position:center;center,graphics:300;100") View.Set ("title:ERROR") put "Uploader Already Deleted." delay (4000) Window.Close (winID) end if else end if ------------------------------------------- here, uhm im not sure were and how to use GUI.ResetQuit. |
Author: | Tony [ Tue May 31, 2011 3:41 pm ] |
Post subject: | RE:Program Run Loop Problem! HELP! |
That typically suggests that you should read the relevant documentation -- GUI.ResetQuit |
Author: | Krocker [ Tue May 31, 2011 3:49 pm ] |
Post subject: | RE:Program Run Loop Problem! HELP! |
ok, now i know what it is, but how do i implement this into my code? srry i am new to this so ya. only been a month on TURING!!! =) |