 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Wed Sep 02, 2015 8:12 pm Post subject: A loop function to dsplay date and time in a trainer |
|
|
Does someone could help to make a clock function and display it in a trainer ?
| Code: |
function makeForm()
title="Game Trainer"
f = createForm(false)
p = createPanel(f)
setProperty(f,"ShowInTaskBar", 'stAlways')
setProperty(f,"Position", "poScreenCenter")
setProperty(f,"BiDiMode", "bdLeftToRight")
setProperty(p,"BiDiMode", "bdLeftToRight")
setProperty(p,"BiDiMode", "bdLeftToRight")
control_setSize(f, 400, 300)
x,y = control_getSize(f)
control_setSize(p, x,y)
control_setCaption(f, title)
---
--- Display date and time here, should be place in a function to loop as a clock
--- with timer function
tm = os.date()
tm = tostring(tm)
lb = createLabel(p)
control_setPosition(lb, 300, 5)
control_setCaption(lb, tm)
--- end of display date and time here
---
form_show(f)
end
makeForm()
|
| Description: |
|
| Filesize: |
26.65 KB |
| Viewed: |
4397 Time(s) |

|
Last edited by Corroder on Wed Sep 02, 2015 9:28 pm; edited 1 time in total |
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Wed Sep 02, 2015 9:00 pm Post subject: |
|
|
| Code: | t=createTimer(nil)
t.Interval=1000
t.OnTimer=function(t)
control_setCaption(lb, tostring(os.date()))
end
t.Enabled=true |
|
|
| Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Wed Sep 02, 2015 9:26 pm Post subject: |
|
|
Thank so much Zanzer for quick response
It's done and work properly
| Code: |
function makeForm()
title="Game Trainer"
f = createForm(false)
p = createPanel(f)
setProperty(f,"ShowInTaskBar", 'stAlways')
setProperty(f,"Position", "poScreenCenter")
setProperty(f,"BiDiMode", "bdLeftToRight")
setProperty(p,"BiDiMode", "bdLeftToRight")
setProperty(p,"BiDiMode", "bdLeftToRight")
control_setSize(f, 400, 300)
x,y = control_getSize(f)
control_setSize(p, x,y)
control_setCaption(f, title)
---
--- Display date and time here, should be place in a function to loop
--- with timer function
lb = createLabel(p)
t=createTimer(nil)
t.Interval=1000
t.OnTimer=function(t)
control_setCaption(lb, tostring(os.date()))
control_setPosition(lb, 300, 5)
end
t.Enabled=true
form_show(f)
end
makeForm()
|
|
|
| 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
|
|