Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Work Break Timer, Task/Idea Logger, ScreenCapture - v. 3.00

  • Please log in to reply
158 replies to this topic
  • Members
  • 211 posts
  • Last active: Dec 04 2014 06:48 PM
  • Joined: 22 Jan 2007

Ever since I started using a modified version of the (10+2)*5 methodology to stay focused and get stuff done, I've been much more productive with my daily work results. 80% of my work these days is in front of a PC, so I wanted a script to facilitate the use of this methodology while recording my daily activities for future review and/or billing purposes to clients.

A while back I was reading a LifeHackerpost by Gina Trapani about a free windows work/break timer (Instant Boss) that supports Merlin Mann's (10+2)*5 procrastination hack. It's a nice application but didn't do everything I needed.

Thanks to a number of favorable AHK articles by another LifeHacker editor, Adam Pash (check out his Texter AHK script), and obviously without concern for personal brain damage, I decided to try my hand at writing some AHK scripts to do what Instant Boss does and more.

If you've got a free moment, please let me know what you think of this script as a productivity tool (e.g does it help you Get Things Done). FYI, if it weren't for David Allen, and his landmark book "Getting Things Done" (GTD), I doubt this script ever would have happened.

Script Credits:
Credit for this script goes to many people on the AHK forum. Both those who wrote the scripts I hacked and those who answered my requests for help when stuck.

In particular, a huge thank you to Tic.
Tic re-wrote the code for everything I was trying to accomplish. I may have hatched the idea, but Tic deserves all programming credit. If weakness/bugs in the coding exists, it' probably integration hacks I did to his code!

Two AHK forum posts were instrumental for much of the code written. Hopefully, it includes all appropriate acknowledgments.


Additionally, thanks to Lexikos and Sean for the alpha blending techniques.

* Code a work-break timer, based on the (10+2)*5 procrastination hack, to help people "Get IT Done".
* Tray Icon to display visual and text progress status
* Provide visual and textual ways for users to review how they spend time during the day.

What the script does (high level):
* Launch a work/break timer (48+12)*3 (48 min. work, 12 min break repeated 3 times). If you'd prefer the original (10+2)*5 approach or something else, you can easily modify it in the "Settings"
* Record new task info:
1) Save to a delimited file for review as a text file or in your favorite spreadsheet pdm.
2) Pass task info to my favorite project/task mgmt open source app. (TodoList).
* Screen Capture:
1) Capture what your doing every x seconds (full screen or active window). Overlay task info (title, tags, comments) onto saved images. Use Irfanview to do a slide show of your day.
* Work/Break sound notification option
* Via GUI, allow users to easily set preferences for all script features to meet their needs.
* Tray Icon Display
1) Visual progress display of elapsed time
2) Mouse over text display of work break cycle & progress

Script status and download:
The script works as originally intended. Rather than guess what users might like in future versions, please try it out and let me know!
Take a look at the code and thanks in advance for any coding help and/or enhancement suggestions.

* Integrate AHK only sideshow functions to replace IrfanView.
* Add Browse function to GUI to allow users to select their own sound file.
* Other stuff recommended by testers and users.

P.S. As always, if anyone has the urge to help out, with any of the above, or just share how they've improved the code, by all means do!

Work-Break Timer, Task Logger & Screen Capture
Note: When Upgrading:
1) rename/delete "work break.ini"
2) rename all *.txt files.
3) Launch wb_timer.ahk/exe and re-configure.
4) After re-configuration, copy and paste old *.txt content into new *.txt files as appropriate.

v. 3.00 Alpha

* Added "Restart Timer" and "Reload Program" to tray menu.
* Removed "Master Task Journal?"" Option. The option confused some users. The Master Task Journal.txt is saved automatically.

v. 2.81 Alpha
http://www.autohotke... 2.81_alpha.zip
Bug fix. Session "Repeat" option broken. Removed TDL exit code to fix.

v. 2.80 Alpha
WB-Timer 2.80 Alpha - Fixes/Enhancements
http://www.autohotke... 2.80_alpha.zip
Objective: Consolidate delimited files for future review and analysis.
* Based on Preference settings and actions, three files are created/updated by WBT.
A) "Start New Task":
A1) info saved to "TaskWorkLog.txt", delimited format.
a1) Optional (ToDoList):
a1a) New task (to be worked on Now) with info saved to selected TDL file.
a2b) TDL timer started.
B) "Capture New Task/Idea"
B1) info saved to "TaskIdeaCapture.txt", delimited format.
b1) Optional (ToDoList):
b1a) New task/idea (to be reviewed/worked on later) with info saved to selected TDL file.
a2b) TDL timer NOT started.
C) "Master Task Journal" - When enabled in Preferences:
C1) info saved to "TaskMasterJournalLog.txt", delimited format.
C1a) GUI info to start a new task ("Start New Task") or
C1b) GUI info for future review/action ("Capture New Task/Idea")
* To facilitate data manipulation, outside of this app, date/time variables have been normalized (sort of)
**Read WBReadme_alpha.txt for more details.**

v. 2.75 Alpha
Lot's of changes and limited testing. As always, please let me know of any bugs or enhancement requests. Alway appreciated.
http://www.autohotke... 2.75_alpha.zip
* Preferences GUI "Other Features" Group Box
Purpose: Group Box for future enhancements.
1) Optional Master delimited Task list of all tasks entered with datetime stamp (MasterTaskList.txt).
Plenty of room for user enhancement requests.
For TDL users:
* Fixed bug in "Start New Task" entry and TDL timer.
1) New task will be assigned to designated TDL file, regardless of whether TDL is open or not and TDL file is active or not.
2) TDL timer will stop for previous active task (regardless if active or not) and start TDL timer for new TDL task.
* Provided "New TDL Task" feature and HotKey Preference.
Purpose: During a work/break session, sometimes a "to do" pops into your head. This feature allows you to quickly capture to TDL as a new task and return to whatever you were doing. Nothing is added to the tasklog.txt and both the work/break timer and TDL timer for active task remain active.
1) During a work/break session, user can capture a new task to TDL for future review and/or action.
2) When selected via menu tray or hotkey, pop-up GUI displays with Task, Tag(s), Comments fields. When "Submit"ted, new task is added to TDL but not tasklog.txt.
3) TDL window is made active, allowing user to add/modify task within TDL before returning to work on active task.
4) Important: After editing "New TDL Task" within TDL and before return to work on active task, make sure active task is re-highlighted.

Note: To differentiate, "Start New Task" has green background & "New TDL Task" has orange background.

v. 2.6 Alpha
http://www.autohotke...k 2.6_alpha.zip
For TDL users: Fixed bug in New Task entry and TDL timer.
* New task will be assigned to designated TDL file, regardless of whether TDL is open or not and TDL file is active or not.
* TDL timer will stop when exiting WB-Timer session, regardless if active or not.

v. 2.5 Alpha
Fixes/Updates in WB-Timer 2.5 Alpha
User requested modifications:
* Screen captures are now saved in dated folder
* For IrfanView sideshow, user now has ability to select which dated folder for to perform sideshow
* Re-odered New Task GUI - Task Title is now the 1st in tab order and Timestamp is last
* Added AutoStart option in Preferences GUI - Thanks bradtwurst
* ToDoList: If "Exit" is selected on "Session Over" pop-up, timer is stopped for New Task created in Helper Apps - ToDoList file. Note: if the New Task created is not highlights (active), on Exit, timer will start on highlighted task. Make sure, before you Exit, task is highlighted in ToDoList. If not, you'll need to manually update.
Bug Fixes:
* Error msg when there's no Hotkey in Preferences GUI for New Task
* New Task Windows placement to center on any screen size
Thanks to HugoV for both fixes
* Corrected file reference for ToDoList file
v. 2.0 Beta
http://www.autohotke...rkBreak 2.0.zip
* Colorized Work/Break Pop-Up Text and matched to icon status meter.
* Added sound notification option.
* Changed log file name from lifelog.txt to tasklog.txt. Fixed minor GUI bugs.
v. 1.1 Beta
http://www.autohotke...rkBreak 1.1.zip
* Modified "Settings" GUI design for improved usability
v. 1.0 Beta - First Release of new code and features.
This release now include user definable hotkey(s) to launch new task & a few other minor updates.

This is a rewrite to an earlier script that's now obsolete.

  • Members
  • 75 posts
  • Last active: Apr 01 2013 06:38 PM
  • Joined: 28 Oct 2007
Nice. :)

I found a bug. (Mm… This not a bug… so… a bug in design)
You use at line 399:
Why bad? In hungarian keyboard AltGr + L = ł And in AutoHotkey AltGr is Left Ctrl + Right Alt.
So… when I would like type ł, your window is open…
^<!L:: ; (Left) Ctrl + Left Alt
*>^!L:: ; Right Ctrl + (Right) Alt

  • Members
  • 211 posts
  • Last active: Dec 04 2014 06:48 PM
  • Joined: 22 Jan 2007
Thanks! Being a non-programmer and totally ignorant of how to "internationalize" the code, didn't even think of this.

Before I make the correction, I did post a help request related to this:
Any ideas how I can implement. If done, I'm thinking the bug would be a "non issue"?

Update: user definable hotkey(s) are now in the code.

  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005
Something similar was posted here. You could reuse some of its ideas.

  • Members
  • 211 posts
  • Last active: Dec 04 2014 06:48 PM
  • Joined: 22 Jan 2007
Thanks Laszlo. I'll take a look.

  • Guests
  • Last active:
  • Joined: --

Thank you for the useful script. :D

I'm wondering if a pause function can be added in case we are interrupted by phone calls or other things that need our attention. :)

  • Members
  • 211 posts
  • Last active: Dec 04 2014 06:48 PM
  • Joined: 22 Jan 2007
Hi Jslu,

Thanks for the kind words.

Adding a "Pause" function/button shouldn't be too hard. I probably won't add it to my version because one reason I use the script to help stay focused and "avoid" interruptions.

For example, if I set it to 48min. work/12min break repeat 3 times, my intent is to work non-interrupted for three hours (i.e 6am - 9am) - I don't take phone calls, do email, etc. If I'm working at home with kids in the house, knowing there will be the occasional "urgent" interruptions, I change the cycle to a 10min. work/2min break repeat 5 times. They've learned it's in their best interest to wait to till my next break before bringing to my attention what's so urgent :wink:

Having said the above, the code's included so people can modify to meet their needs. If you not sure how, others in this forum are great at giving pointers and help.

  • Members
  • 49 posts
  • Last active: Mar 14 2013 06:16 AM
  • Joined: 06 Oct 2007
Slightly off topic: I will try this out, but at a more conservative (10- 3)*4 setting. Thank you.

  • Guests
  • Last active:
  • Joined: --

Seems like a nice app (I like the look of the popup message :-)). A couple of things:

It doesn't seem to be optimised for a 800x600 screen. The first time I opened the settings screen from the tray, the title bar was up out of reach. Had to make the resolution larger to get at it. Even then, the settings menu is taller than the screen when running 800x600.

It also seems to take a lot of time to start up. Maybe it's just my system, though I haven't seen any problem with any other apps.


  • Guests
  • Last active:
  • Joined: --
For some reason, the screen capture is not working. Please advise. Thanks.

  • Moderators
  • 9162 posts
  • Last active: Sep 12 2014 10:36 PM
  • Joined: 30 Aug 2005
@Guest, why do you use only 800x600? more and more programs are not able to fit well in that resolution. Also, please use some nickname when posting.

@kspadee, I haven't looked, but you likely need to have IrfanView installed. Do you have this?

  • Guests
  • Last active:
  • Joined: --
Thanks engunneer. Finally got it to work. Very nice idea. Thanks again.

  • Members
  • 211 posts
  • Last active: Dec 04 2014 06:48 PM
  • Joined: 22 Jan 2007
@Guest: re: 800x600 res - I thought this might be an issue. I agree with engunneer re: higher resolution than 800x600, these days, is recommendable as a best practice. Regardless, I'll go ahead and change the GUI dimensions (reduce height, increase width) for next version.
re: start-up speed - I suspect it's the way the visual ico bar works that makes it appear to start slowly. The timer and functions start immediately after you click "Start". However, if you're using the default (48+12)x3, it's going to take a little while before you actually see changes in the progress bar. Change the cycle to something less - e.g. (3+1)x3 and you should see what I'm referring to. Alternately, you can mouse over the tray icon and the tray tip will give you a text status of your progress while verifying the program is actually running.

@kspadee: Screen capture: engunneer's correct. This version requires IrfanView to playback a slideshow of the screen captures. Top on my "ToDoList" is to code the slideshow functionality into the script so IrfanView won't be required. Regrettably, haven't a clue how to implement it so any guidance is always appreciated :wink:

Thanks to all who've taken the script for a spin and giving feedback. It's really appreciated.

  • Members
  • 211 posts
  • Last active: Dec 04 2014 06:48 PM
  • Joined: 22 Jan 2007

Slightly off topic: I will try this out, but at a more conservative (10- 3)*4 setting. Thank you.

Absolutely. I thought it important to give users the ability to set work/break/repeat parameters that work for them or just experiment till they find a good balance for their style and work habits. It all good if it helps you be more productive :D

  • Members
  • 211 posts
  • Last active: Dec 04 2014 06:48 PM
  • Joined: 22 Jan 2007
FYI, beta 1.1 available.
* modified "Setting" GUI width & height to work with 800x600 & some minor usability improvements.