Program Run Loop Problem! HELP!
Author |
Message |
Krocker
|
Posted: 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>
Turing: |
import GUI
View.Set ("graphics:500;200,nobuttonbar")
View.Set ("title:-KDB-CLEANER")
GUI.SetBackgroundColor (grey)
procedure FileName (status : boolean)
end FileName
color (white)
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)
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
|
Please specify what version of Turing you are using
<Answer Here> |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Zren
|
Posted: 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. |
|
|
|
|
|
XZNZ
|
Posted: 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. |
|
|
|
|
|
Krocker
|
Posted: 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. |
|
|
|
|
|
Tony
|
|
|
|
|
Krocker
|
Posted: 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!!! =) |
|
|
|
|
|
|
|