The eccoMAGIC Forums
http://forums.eccoMAGIC.com/forum/YaBB.pl the SLANG EXTENSION and Guest Programming >> Slang Rules Scripts, Functions, Examples and HOW TO >> Time Recorder http://forums.eccoMAGIC.com/forum/YaBB.pl?num=1197264504 Message started by ykorovin on 12/09/07 at 23:28:23 |
Title: Time Recorder Post by ykorovin on 12/09/07 at 23:28:23 Time Recording +Summary +Interruptions. Now with accuracy to second. Set selected item as current by a single hotkey hit. Key folders Current (checkmark) no rules seconds (number) ++::0: SpentT (number) ++::0: SumT (number) ++:C!-:sumc(fv("SpentT"))+sumc(fv("SumT")): oldt (checkmark) - use it to find the just closed item, to correct SpentT manually if needed. no rules Key LUAscript, used for offset time spent on a task: function time() -- get time (mines a "zero level point" to fit into "number" folder type) local tnow = os.time()-1200000000 -- new item (selected) itemnew = get_select_items() -- clear oldt x = get_folder_items("oldt") max=table.maxn(x) for i=1,max do set_folder_value("oldt",x[i],0) end -- old item - calculate spent, unflag current, flag oldt x = get_folder_items("Current") max=table.maxn(x) for i=1,max do spentjust = tnow - get_folder_value("seconds",x[i]) msgbox(get_item_text(x[i]), "+" .. math.floor(spentjust/0.6)/100 .. " mins") spentnew = spentjust / 60 + get_folder_value("SpentT",x[i]) set_folder_value("SpentT",x[i],spentnew) set_folder_value("Current",x[i],0) set_folder_value("oldt",x[i],1) end -- new item - flag current, unflag temp, renew seconds set_folder_value("Current",itemnew[1],1) set_folder_value("seconds",itemnew[1],tnow) end |
Title: Re: Time Recorder Post by ykorovin on 12/20/07 at 01:20:44 In the time_recorder_2.6 i've added taskbar counter indicator. |
Title: Re: Time Recorder Post by Admin on 12/20/07 at 17:32:09 Impressive! |
The eccoMAGIC Forums » Powered by YaBB 2.1! YaBB © 2000-2005. All Rights Reserved. |