Post by tsh73 on Oct 8, 2019 7:20:04 GMT
One day I got an urge to see how much time I waste while on a computer.
So I wasted some more time making this program.
It looks useful, and shows I waste more time I ever thoughtEDIT and since main part of it is ordinary texteditor, you can write right there, adding stuff, fixing typos ("posing -> posting") etc
Things probably worth adding:
- saving log on exit, adding to huge text file with headers like
08 Oct 2019 ======================
- at the end of the day, reporting total time (or percentage) of fun time/ job tome/ empty time
(yes it happens there lot's of time falling between tasks)
- probably add "pause/resume" button
- mark time scale (where colored stripes is), say with hour marks (and | or digits)
- mark start of new task with black line (incase I start just after finishing previous one)
Thing I have no idea how to tackle.
Sometimes I mark task "Done" but then I get a call or email and actually continue working on same task.
So there should be a way to pick up closed task, and run it again.
There some design decisions needed.
(Oh, and sometimes I just forget to enter new task/start it).
'time tracker I suggenly had an urge to do
'tsh73 Oct 2019
'v.1.00 Oct 02, some 30 minutes for intitial version
'v.1.01 Oct 08 some variables added (taskType$, taskColor$ etc)
vers$="0.01"
nomainwin
WindowWidth = 600
WindowHeight = 415
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
UpperLeftY=int((DisplayHeight-WindowHeight)/2)
taskType$="Fun Job"
taskColor$="blue red"
jobStart=9 '9 o'clock
jobFinish=18 '18 o'clock
statictext #main.statictext1, "So what are we up to?", 14, 6, 360, 20
textbox #main.txtDescr, 14, 25, 360, 25
radiobutton #main.rb1, word$(taskType$, 1), [radioButtonIgnore], [radioButtonIgnore], 390, 16, 56, 20
radiobutton #main.rb2, word$(taskType$, 2), [radioButtonIgnore], [radioButtonIgnore], 390, 36, 56, 20
button #main.btnGo, "Let's GO!", [button5Click], UL, 454, 21, 122, 25
textbox #main.txtTime, 454, 50, 122, 25
button #main.btnOver, "Enough!", [button6Click], UL, 454, 80, 122, 25
statictext #main.statictext7, "On the big scale of things we are...", 14, 51, 360, 20
graphicbox #main.gr, 14, 71, 432, 25
texteditor #main.log, 14, 101, 424, 230
menu #main, "Edit" '<--- Texteditor Menu can be moved but not removed.
open "TaskTimer v.";vers$ for window_nf as #main
print #main.gr,"down; fill white; flush"
print #main, "trapclose [quit.main]"
print #main, "font ms_sans_serif 10"
#main.rb1 "set"
#main.btnOver "!disable"
#main.gr "Down; fill white; flush"
#main.txtDescr "our little business"
#main.txtDescr "!setfocus"
wait
[quit.main]
timer 0
Close #main
END
[radioButtonIgnore]
wait
[button5Click] 'Perform action for the button named 'btnGo'
'let's GO
t0=time$("seconds")
timer 1000, [tick]
#main.btnGo "!disable"
#main.btnOver "!enable"
#main.txtDescr "!contents? cont$"
#main.rb1, "value? rb1Set$"
if rb1Set$="set" then taskType=1 else taskType=2
msg$= word$(taskType$, taskType)
colr$=word$(taskColor$, taskType)
#main.log time$(); " ";msg$
#main.log " ";cont$
#main.gr,"color ";colr$
wait
[button6Click] 'Perform action for the button named 'btnOver'
'Enough
#main.btnOver "!disable"
#main.btnGo "!enable"
#main.log "Finished ";time$(); " "; "Time taken ";t$ ;"(";dt;")"
timer 0
wait
[tick]
t=time$("seconds")
dt = t-t0
t$=int(dt/60/60);":";int(dt/60) mod 60;":";dt mod 60
#main.txtTime t$
w=432
x0=w*(t-1-jobStart*60*60)/((60*60)*( jobFinish-jobStart)) 'previous second translate here
x=w*(t-jobStart*60*60)/((60*60)*( jobFinish- jobStart))
if int(x)<>int(x0) then 'draw only then need to
#main.gr,"set ";x;" 20"
#main.gr,"go 15"
#main.gr,"flush"
end if
wait
EDIT
today log so far
09:09:47 Fun
fix that time tracker program
actually I started it before I run it, obviously
(and since it is a textbox I could type right here wile task counts)
so my estimate is that it took some 15 minutes.
Finished 09:13:41 Time taken 0:3:54(234)
09:13:55 Fun
tea and forums
Finished 09:30:21 Time taken 0:16:25(985)
09:30:32 Job
read mail
Finished 09:34:22 Time taken 0:3:50(230)
09:35:35 Job
adding user 11389
Finished 09:42:00 Time taken 0:6:24(384)
09:42:27 Job
replying HR mail
Finished 09:45:45 Time taken 0:3:18(198)
09:47:07 Job
adding users 39202
Finished 09:58:43 Time taken 0:11:36(696)
10:01:01 Fun
posting this program at JB Forum ;)
Finished 10:24:51 Time taken 0:23:49(1429)