How do I Start the running time and clear it? Right now I got a program with a button that starts and stops the macro. When you stop it it produces a report with the amount of potions used and food eaten. It also tells how much time past. How do I get it so the time starts when I click the start button, and stops/clears when I click the stop button?
Code:procedure StartMacro(Sender: TObject); begin if MacroIsLive = False then begin MacroIsLive := True; MacroIsLiveButton.Caption := 'End Macro'; end else if MacroIsLive = True then begin MacroIsLive := False; MacroIsLiveButton.Caption := 'Start Macro'; ConvertTime(GetTimeRunning, H, M, S); RunningTime := (IntToStr(H) + ':' + IntToStr(M) + ':' + IntToStr(S)); DebugBox.Lines.Add('{ Macro Report }'); DebugBox.Lines.Add('Health Potted: ' + IntToStr(HealthPotionsUsed) + '.'); DebugBox.Lines.Add('Mana Potted: ' + IntToStr(ManaPotionsUsed) + '.'); DebugBox.Lines.Add('Food Eaten: ' + IntToStr(Food1Eaten) + '.'); DebugBox.Lines.Add('Time Ran: ' + RunningTime + '.'); DebugBox.Lines.Add(''); end; end;


Reply With Quote





)




