topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 9:11 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: IDEA: Very simple timeclock utility  (Read 86815 times)

vixay

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 140
  • ViXaY
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #50 on: June 29, 2008, 11:17 PM »
Building a new pc... sigh there was a time when i enjoyed doing that, now it seems like nothing but a chore! I have to setup 1 new laptop, 1 new pc, and buy several new laptops for friends and family and then set them up again.... its a pain i tell ya! And this all after setting up 5 new laptops already! Everybody enjoyed it so they want more.
I have been putting off using my new laptop since ages, until my wife forced me to let go off my aging but cozy laptop and migrate to the new one, and i haven't even finished migrating yet.

Don't get me started, but i guess it's too late already... hehe :)

That reminds me, i saw the exhibit they had over here, on Earth from Above (it was quite good and thought provoking, but also had too much doom and gloom :(), anyway in that it said that it takes 1.8 Tons of material to build each PC, did you guys know that? That puts on a whole new meaning to having so many PCs around.... i don't feel so environmentally friendly anymore :(

anyway back to topic on hand.

Good luck with your new PC, brett, and i'll be looking forward to seeing the new versions...
"Drunk on the Nectar of Life!" -me

TomTrottier

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 6
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #51 on: March 02, 2010, 07:57 PM »
Marvellous time tracking utility for computer users. It really answers the question, "What did I do today?"

Some suggestions, should you care to do a little more work,
  • For add a comment, have a drop down box with a list of the most recently used comments
  • If you implement the drop box, place the Add Comment window at the top left of the screen so there is max room for display of previous Comments

Marvellous, marvellous! :D :-*

TomTrottier

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 6
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #52 on: March 24, 2010, 12:19 PM »
fwiw, you can put the url in the Firefox titlebar (ie window frame) with Titlebar Tweaker.

tOM  :-*

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #53 on: February 27, 2012, 09:33 PM »
Hello (Brett and titlelog fans).

I've made a couple modifications to the script.

1- When I double click an item in the list (detailed view), the "window title" or message is copied to the clipboard, ready to be copied somewhere else.

2- A message (Comment) can be entered by pressing Ctrl+Chift+Alt+T. The shortcut key opens the "comment" dialog.

3- When I enter a Message in the "Comment" dialog and save it, it's also copied to the clipboard.

4- fixed a bug : manual comments didn't show up in the list. They now do

5- Other small personal things like initial sort (reversed), etc.

Anyhow, if someone is interested... :)

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #54 on: February 29, 2012, 07:41 AM »
Some users showed interest so here's my tweaked version (attached)

From the last post, modifications are :

1- If double click an item in the list (detailed view), the "window title" or message is copied to the clipboard, ready to be copied somewhere else.

2- A message (Comment) can be entered by pressing Ctrl+Chift+Alt+T (the shortcut key opens the "comment" dialog).

3- When one enters data in the "Comment" dialog & saves it ("Save Comments" button), it's also copied to the clipboard, ready to be copied somewhere else.

4- fixed a small bug : manual comments didn't show up in the detailed list. They now do

5- Other things like the initial sort in the detailed view (hours descending instead of ascending).

VoilĂ  !

P.S. : And a big THANK YOU to Brett for that great program.

DyNama

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 73
  • Are you a good witch or a bad witch?
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #55 on: March 17, 2012, 03:40 PM »
Some users showed interest so here's my tweaked version (attached)

P.S. : And a big THANK YOU to Brett for that great program.

Thanx, Armando, for your tweeks! i did have to fix a few typos:
Line 34:
  Menu, Tray, Icon, E:\configurations\AHK Scripts\TitleLog\TitleLog.ico, , 1
i had to change the path. in fact i don't have an AHK icon handy, so i put the path to a clock icon.

Line 114:
  Gui, 2:add, UpDown, Range 1-60,%idletime%
When i click Preference on the menu, this line errored, so i tried putting a comma after Range, and it works!

Line 443:
  TV_Modify(0, "Sort").
i deleted the period.

Thanx again, Armando, and original author Brett!

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #56 on: March 17, 2012, 05:58 PM »
Thanks !

1- Line 34 - Ooops. Yes I forgot about that icon business... . I use a custom icon too. I should've put a relative link the script folder, or something like that. I could fix that.

The other two aren't linked to my modifs. They were there before.

2- Line 114 -  Didn't change anything on that line. I'm not sure why you got an error though as I don't think you need a comma after "range". (See AHK documentation. E.g. GUI Control Types-> UpDown (3rd section on the page)). However, there's a syntax error there anyway. It shouldn't be "range 1-60" but "range1-60". (Note that making a syntax error there limits the number range to 100 instead of 60.)

 Gui, 2:add, UpDown, Range1-60, %idletime%

3- Line 443 :  I didn't touch that line either. Strangely, AHK's parser / script compiler doesn't yell at that period (and it didn't say a word about the wrong range argument !)... So it must be pretty forgiving.

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #57 on: March 17, 2012, 06:53 PM »
I kept being interrupted by daughter dramas...!

So here. I corrected the icon problem. The script looks for it in the working directory (i.e. in the folder where you're running the script), if it doesn't exist, it just moves along...

I also provided a compiled version for those who'd preferred to run an EXE instead.

You can just replace your current .AHK or .EXE file and tell me if it works well.

DyNama

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 73
  • Are you a good witch or a bad witch?
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #58 on: March 18, 2012, 05:48 PM »
Armando,
looks good!

i'm brand spanking new to AHK! deleting that period was the very first edit i ever made to an AHK file! last night i tried to make a hotstring and it took over 1-1/2 hours to get the syntax right! (i wasn't putting %s around a %variable%  :-[)

perhaps earlier in this thread it was debated whether the preset messages should be logged. i want them to, so the other change i made to TitleLog.ahk is to change the lines
SetTimer, logchanges, off
to on, all 8 times, and that seems to do it!

when i look at the details log, and click on the summary view button, the summary log opens, but when i close it, the detail view is now empty! is it supposed to do that? no problem, i just close it and reopen it.

thanx for updating this project!

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #59 on: March 18, 2012, 08:56 PM »
perhaps earlier in this thread it was debated whether the preset messages should be logged. i want them to, so the other change i made to TitleLog.ahk is to change the lines
SetTimer, logchanges, off
to on, all 8 times, and that seems to do it!

Actually, the on/off switch has nothing to do with logging or not the preset messages. Unless you made some other changes, they should already be logged -- here, they are...

As far as I understood is that the parameter determines whether other windows titles will be logged or not while the preset message is visible. Personally I think it makes more sense to leave the value as it is :  off

What wasn't working properly before was that the custom comments weren't showing in the details view. I "fixed" that but forgot to mention it in the script. Custom comments didn't show up because they had no value to calculate the "Elapsed" (%result%) value. So I just added literals. I must admit that I took maybe 10min to create that "solution". It's a quick hack as I only needed to see my custom comments in the detailed view.  :-[

when i look at the details log, and click on the summary view button, the summary log opens, but when i close it, the detail view is now empty! is it supposed to do that? no problem, i just close it and reopen it.

That has always been the case I think. I didn't try to fix it as it doesn't bother me enough. I just click the "Refresh & Reset list" button.

thanx for updating this project!

You're welcome... I'm not an official updater, though...  :-[

DyNama

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 73
  • Are you a good witch or a bad witch?
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #60 on: March 18, 2012, 10:57 PM »
no, i didn't change anything else, just 8 "off"s. with it off, when i choose "out to lunch" from the right-click tray icon menu, a msgbox with the title "out to lunch" pops up but it isn't logged, the time "out to lunch" was begun does not show in my detail log. it may stop logging the elapsed time to window that had focus before invoking "out to lunch" but it doesn't log the time the "out to lunch" button was up.

when it is set to "on", it does show in the detail log and shows the elapsed time the button was up. you're saying if i switched windows while the button is up, it would continue to log the window that has focus? i suppose that's okay, as long as "out to lunch" shows up in the detail view--that's my main interest.

well, you know what they say about a little knowledge being a dangerous thing! i used to program a lot in BASIC and  AutoLISP, but i haven't programed for a while so i'm enjoying tinkering with the insides in AHK. thanx!

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #61 on: March 19, 2012, 12:07 AM »
no, i didn't change anything else, just 8 "off"s. with it off, when i choose "out to lunch" from the right-click tray icon menu, a msgbox with the title "out to lunch" pops up but it isn't logged, the time "out to lunch" was begun does not show in my detail log. it may stop logging the elapsed time to window that had focus before invoking "out to lunch" but it doesn't log the time the "out to lunch" button was up.

Weird. Here the message box is logged, with proper time, etc. It's always been. And everything is set to OFF for the reason mentioned in my previous post.

I just tried the original version, and it does log these message box. What it doesn't log though are the comments from the "Add a comment" dialog.

you're saying if i switched windows while the button is up, it would continue to log the window that has focus? i suppose that's okay, as long as "out to lunch" shows up in the detail view--that's my main interest.

Yes -- unless I'm mistaken -- that's what it should be doing from what I understood after a quick look at the script.

well, you know what they say about a little knowledge being a dangerous thing! i used to program a lot in BASIC and  AutoLISP, but i haven't programed for a while so i'm enjoying tinkering with the insides in AHK.

Hehe. Programming/scripting is fun !  :)

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #62 on: March 19, 2012, 12:20 AM »
Just a note :  if you're looking at the "Summary view", those "message box" appear under the "autohotkey.exe" application name.

(I also realized that while the comments aren't appearing in the detailed view -- in the original version -- they actually do in the "Summary view", but without any useful time indications...)

DyNama

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 73
  • Are you a good witch or a bad witch?
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #63 on: March 19, 2012, 07:42 PM »
TitleLog just doesn't log the presets msgboxes for me, not in 1.17.29 or 1.17.28. i downloaded a new copy of Brett's last .ahk version, deleted the period in the TV_modify line, and ran it from a temp folder with no further modification. after a while, i picked "out to lunch" from the tray menu, and 10 minutes later took this screen cap:

titlelog.jpg

notice "out to lunch" is not logged, nor is calling up the detail log while the "out to lunch" msgbox is still going. that's why i feel the need to change something. while the "out to lunch" box is up, titlelog is just not logging anything at all.

i'm running the titlelog.ahk file with AutoHotkey_L on a win7 laptop. i'm also running a hotstring.ahk file that i created, and 2 AutoHotkey executable programs, CapShift and Close2Quit, that i got here on donationcoder.
« Last Edit: March 19, 2012, 08:21 PM by DyNama, Reason: edited for clarification »

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #64 on: March 19, 2012, 08:35 PM »
Did you close the message box before looking at the log view ? The message won't be written to the log file until you close it. Also, the original version won't log anything while the message box is open -- this is by design : if you're lunching, you're not necessarily trying to see what your computer activities are (unless that's not what you want, of  course...).

I just redownloaded v1.17.28 and here's a screenshot after closing the message box and opening the "details" view :

Screenshot - 2012-03-19 , 21_31_06.png

("Out to lunch" being the message box)

[EDIT : of course, if you didn't like that behaviour, I understand why you'd turn the switch ON. However, my point is that it's not that the message box isn't log, but that it's not "logged" while it's opened to be able to calculate (e.g.) how long your lunch period was.]



DyNama

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 73
  • Are you a good witch or a bad witch?
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #65 on: March 19, 2012, 10:19 PM »
i have opened and closed the message box a dozen times since i downloaded 1.17.28 and there are no "out to lunch" logs at all:

titlelog2.jpg

i want to get what you get! how can it be different? the version i'm running still has the range typo and doesn't do anything when double-clicked.

DyNama

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 73
  • Are you a good witch or a bad witch?
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #66 on: March 19, 2012, 10:39 PM »
here is the detail view after pressing "out to lunch" and "phone call" a dozen more times (sorted by application):
titlelog3.jpg

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #67 on: March 20, 2012, 09:43 AM »
Ok, I most probably found the problem : We're not using the same AHK version (thought about that thanks to Lanux in this thread). I should've thought about that earlier...  :-[

Which version are you using ? I just moved to the last version and... Am having the same problem you have.
I don't have the time to fix that at the moment, but will check it out later this week. Meanwhile, if you come up with a solution, I'll be happy to try it !  :)

Thanks for your patience and perseverance !

DyNama

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 73
  • Are you a good witch or a bad witch?
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #68 on: March 21, 2012, 12:26 AM »
i'm running the titlelog.ahk file with AutoHotkey_L on a win7 x64 laptop. i'm also running a hotstring.ahk file that i just created, and 2 AutoHotkey executable programs, CapShift and Close2Quit, that i got here a while ago on donationcoder.

actually i realized that if
Code: Text [Select]
  1. SetTimer, logchanges, off
is a line to turn off the timer, the timer must be on, therefore it's redundant to change that line to "on". there was 1 more line that Brett intended to turn it back on after it had been off:
Code: Text [Select]
  1. SetTimer, logchanges, ON                        ;turn the timer back ON
so i put semi-colons in front of the 9 lines rather than change them.

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #69 on: March 21, 2012, 10:05 PM »
i'm running the titlelog.ahk file with AutoHotkey_L on a win7 x64 laptop.
So that's it. Now that I installed AutoHotkey_L, I'm experiencing the same problem as you.
I don't have the time to fix the code fat this point. But you want to look at it though, that would be great.
I haven't looked at the SetTimer method... I have a look at it during the weekend.
Thanks !

DyNama

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 73
  • Are you a good witch or a bad witch?
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #70 on: March 22, 2012, 02:28 AM »
each preset msg is coded to show the msgbox then turn off the timer:
  Gui,3: show,,%Custom1%     ;this pops up the msgbox, no?
  SetTimer, logchanges, off     ;this turns off the timer
i don't really know, but it seems to me that the easiest explanation for it working under old AHK but not AHK_L is that AHK popped up the msgbox first but for some reason AHK_L turns off the timer first, so a new window, albeit one created by this program, doesn't get logged.

if just popping up a new window isn't going to work under AHK_L, we could have each of the 8 presets call a subroutine that ends the previous timer and logs the result, and starts a new timer for the preset. unfortunately i don't find one. i think Brett intended to make one out of the Logchanges sub, he has a comment ";move this section as a gosub", that does what each preset message would have to do. but i don't know how to do that.

DyNama

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 73
  • Are you a good witch or a bad witch?
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #71 on: March 30, 2012, 07:08 PM »
here is another set of typographic errors:
 If (Custom1<>"Undefined" and Custom1<>"")                                       ;if underfined or empty, dont show in Tray Menu
      Menu, tray, add, %Custom1%, M1
  If (Custom2<>"Undefined" and Custom2<>"")
      Menu, tray, add, %Custom2%, M2
  If (Custom3<>"Undefined" and Custom3<>"")
      Menu, tray, add, %Custom3%, M3
  If (Custom4<>"Undefined" and Custom4<>"")
      Menu, tray, add, %Custom4%, M4
  If (Custom5<>"Undefined" and Custom5<>"")
      Menu, tray, add, %Custom5%, M5
  If (Custom6<>"Undefined" and Custom6<>"")
      Menu, tray, add, %Custom6%, M6
  If (Custom7<>"Undefined" and Custom7<>"")
      Menu, tray, add, %Custom5%, M7
  If (Custom8<>"Undefined" and Custom8<>"")
      Menu, tray, add, %Custom6%, M8
Brett forgot to change the last 2 to %Custom7% and %Custom8%.

Save:                    ;;; ;save and submit to ini from PrefsGui GUI:2
  Gui, 2:Submit
  IniWrite, %Custom1%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 1
  IniWrite, %Custom2%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 2
  IniWrite, %Custom3%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 3
  IniWrite, %Custom4%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 4
  IniWrite, %Custom5%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 5
  IniWrite, %Custom6%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 6
  IniWrite, %Custom5%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 7
  IniWrite, %Custom6%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 8
  IniWrite, %Idletime%, %A_Scriptdir%\TitleLog Prefs.ini, Idletime, 1
  IniWrite, %donotlog%, %A_Scriptdir%\TitleLog Prefs.ini, Donotlog, 1
here too.

but lanux128 messaged me to suggest replacing the whole thing with a loop:
Loop, 8                                                               ; since there are only 8 custom msg supported via gui (lanux128)
  {
  If ((Custom%A_Index%<>"Undefined") And (Custom%A_Index%<>""))    ;if undefined or empty, dont show in Tray Menu
    {
      Menu, Tray, Add, % Custom%A_Index%, CustomMsg              ; change M1-M8 labels into "CustomMsg"    (lanux128)
    }                                          
  }
« Last Edit: March 30, 2012, 07:27 PM by DyNama »

shmuel1

  • Supporting Member
  • Joined in 2012
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #72 on: May 30, 2012, 05:02 AM »
Nice utility! Thanks.
« Last Edit: May 30, 2012, 05:18 AM by shmuel1 »

Montgomery_Minds

  • Participant
  • Joined in 2013
  • *
  • Posts: 9
    • View Profile
    • Montgomery Minds
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #73 on: February 07, 2013, 11:16 PM »
My first post.  Great Site.  Someone mentioned that Firefox Add-on "Titlebar Tweaker" would be good to use with this TitleLog program.  I investigated that.  It REMOVES the regular TitleBar, and adds its own.  That seems a little heavyweight to me.  And indeed some of the reviews mentioned various problems.

I found instead customize_titlebar_v2 <https://addons.mozilla.org/en-US/firefox/addon/customize_titlebar_v2/>.  This worked for me in Firefox 18.0.2.  BUT i have Menu Bar visible.  Many people do not.  There were other Add-ons that put the titlebar text back even with Menu Bar off, but i did not test them :(  I did read, however, that even tho the title is not visible when Menu Bar is off, it's still there so hopefully TitleLog will still see it.

By default customize_titlebar_v2 does not include the "Firefox" string at the end.  I want that so i used the Custom Format with string  
{pageTitle} - {currentUrl} ({brand})

And such an Add-on IS helpful, i find, cuz a lot of sites just put their site name in the title--no other detail about WHAT you were viewing at that site.

I found the TitleLogTweaked.zip very helpful--especially the displaying the comment in detail view and the sorting most recent first.

Thanks to all you fine donation coders! :D

(Wow this site has a fast preview ;))

Montgomery_Minds

  • Participant
  • Joined in 2013
  • *
  • Posts: 9
    • View Profile
    • Montgomery Minds
    • Donate to Member
Re: IDEA: Very simple timeclock utility
« Reply #74 on: February 11, 2013, 08:14 AM »
There's a bug.  Example: when i arrive at the computer first thing in the morning, it is (correctly) prompting me with the idle prompt.  So i type "sleep".  But in the log, both the "Idle Text" i just typed, AND the last window i had open last night, both have the duration of the idle period (my sleep), say 8hours.  This bug propagates to the Total time in the status bar, because the idle time is counted twice, once for the Idle Text and once for the window.

The Idle Text duration should either replace the most recent entry of an actual window title (since the user was idle) or perhaps subtract the Idle Text duration from the most recent actual window title, because, for example, the user was typing and entry into a forum, hit post, then walked away from the computer.  So that window will then be up during the whole idle period, and had some non-idle time that should be counted.

Still a great app.