|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1253
|
Posted: Sat Jun 01, 2019 1:41 pm Post subject: CE Stopwatch: With Simple Codes! |
|
|
With simple codes: Forward or Countdown Stopwatch.
Sometimes in the game: the enemy soldiers, the time of encounter
or I need to calculate the ranges in which some bonuses are active.
I think that's stopwatch and recorder, sees this work.
You use it as you wish.
Codes are completely CEF-induced. You can use it independently.
Just: Creator Aylin
Image: https://i.hizliresim.com/gPjR6b.png
What it does:
1) Given value: Counts forward.
2) Given value: Counts down.
3) 3 units, "Time interval" records.
4) A certain time can be assigned to stop.
5) And into it, endless ideas can be added.
Enjoy it!
Code: | f = createForm(true)
f.Position = poDesktopCenter
f.Width = 260
f.Height = 140
f.caption="Stopwatch V1.0"
f.Font.Size = 9
f.Font.Style = "fsBold"
e1 = createEdit(f)
e1.Height = 23
e1.Width = 80
control_setPosition(e1, 60, 9)
e1.Text = "100"
e2 = createEdit(f)
e2.Height = 23
e2.Width = 80
control_setPosition(e2, 60, 40)
e2.Text = "0.0"
b1 = createButton(f)
control_setPosition(b1, 160, 7)
b1.caption="Start-Pause"
b2 = createButton(f)
control_setPosition(b2, 160, 38)
b2.caption="Reset"
b2.visible=true
b3 = createButton(f)
control_setPosition(b3, 160, 7)
b3.caption="Start-Pause"
b3.visible=false
cb1 = createCheckBox(f)
control_setPosition(cb1, 10, 68)
cb1.caption="Click Next Time"
l1 = createLabel(f)
control_setPosition(l1, 10, 12)
l1.caption="Start"
l2 = createLabel(f)
control_setPosition(l2, 10, 42)
l2.caption="Stop"
l3 = createLabel(f)
control_setPosition(l3, 70, 92)
l3.caption="Click Record Time:"
l4 = createLabel(f)
control_setPosition(l4, 30, 112)
l4.caption="0.0"
l5 = createLabel(f)
control_setPosition(l5, 110, 112)
l5.caption="0.0"
l6 = createLabel(f)
control_setPosition(l6, 200, 112)
l6.caption="0.0"
t1 = createTimer(f) t1.Interval = 100 t1.Enabled = false
t2 = createTimer(f) t2.Interval = 100 t2.Enabled = false
--------------------------------------------
b1.OnClick = function()
if t1.Enabled==true then
t1.Enabled=false
else
t1.Enabled=true
end
end
b3.OnClick = function()
if t2.Enabled==true then
t2.Enabled=false
else
t2.Enabled=true
end
end
b2.OnClick = function()
e1.Text='100'
e2.Text='0.0'
l4.caption='0.0'
l5.caption='0.0'
l6.caption='0.0'
t1.Enabled=false
t2.Enabled=false
end
t1.OnTimer = function()
if e1.Text=="0.0" or e1.Text=="" then
t1.Enabled=false
showMessage("Please enter a value for Start and Stop!\nSample: Start: 100 and Stop: 40.0")
e1.Text="100"
e2.Text="40.0"
else
e1.Text=((e1.Text)-0.1)
if e1.Text=="0.0" then
t1.Enabled=false
elseif e1.Text==e2.Text then
t1.Enabled=false
end
end
end
l4.OnClick = function() l4.Caption=e1.Text end
l5.OnClick = function() l5.Caption=e1.Text end
l6.OnClick = function() l6.Caption=e1.Text end
cb1.OnChange = function()
if cb1.Checked==true then
b1.visible=false
b3.visible=true
cb1.caption="Click Back Time"
else
b3.visible=false
b1.visible=true
cb1.caption="Click Next Time"
end
end
t2.OnTimer = function()
if e1.Text=="0.0" or e1.Text=="" then
t2.Enabled=false
showMessage("Please enter a value for Start and Stop!\nSample: Start: 100 and Stop: 40.0")
e1.Text="100"
e2.Text="40.0"
else
e1.Text=((e1.Text)+0.1)
if e1.Text==e2.Text then
t2.Enabled=false
end
end
end
f.OnClose = function()
CloseCE()
return caFree
end
|
EDIT: {
Thank you for your attention is Master @Corroder.
Added:
Code: | b2.visible=true
b3.visible=false
t2.Enabled=false --b2.OnClick.. |
I couldn't see problems for other issues, here's the video:
https://www.cocoscope.com/watch?v=23218
}
_________________
Last edited by AylinCE on Sun Jun 02, 2019 2:39 pm; edited 2 times in total |
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Sun Jun 02, 2019 12:22 pm Post subject: |
|
|
I did a test:
1. if edit1.text = edit2.text - timer not stop
2. when timer run, button reset not set enable to false, then if the user clicks on reset button when timer run, nothing reset, the timer still running.
3.checkbox label caption. more easy to understand if set 'countdown' and 'count up' instead 'next' and back
4. Three elapsed timer record caption, give the same value. So, what these used for?
Anyhow, good job
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1253
|
Posted: Sun Jun 02, 2019 2:29 pm Post subject: |
|
|
Thank you for your attention is Master @Corroder.
Added:
Code: | b2.visible=true
b3.visible=false |
I couldn't see problems for other issues, here's the video:
https://www.cocoscope.com/watch?v=23218
_________________
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|