Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

motulist

macrumors 601
Original poster
Dec 2, 2003
4,234
611
I've searched endlessly and i can't find an app that does what i'm looking for, but it's such a simple and useful functionality that an app for it MUST exist.

It's SUPER simple. All i want it to have is basically one main button. when you hit the button, it starts the timer. When you hit the button again, it stops the timer and saves the elapsed duration into the log, and automatically starts a new timer. At any moment before, during or after a timer has finished you can select the category of how that time was spent.

N.B. I do NOT just want it to record just a single collective amount of time for each task, no. I need it to show me the duration of each session.

And that's basically ALL i want it to do! Bonus points if the task groups you create can be assigned colors, and bonus if it can *also* show you the collective amount of time you've spent on every task each day or week or whatever, and huge bonus points if the app is simple and easy to use.

For example:


_________________________________

Select task "read book"



Hit button -->
timer starts counting up from 0:00



10 minutes later hit button again -->
log shows "read book 0:10 minutes", AND
new timer starts counting up from 0:00



Select task "write notes"




5 minutes later hit button again -->
log shows "write notes 0:05 minutes /// read book 0:10 minutes", AND
new timer starts counting up from 0:00
__________________________


It's so fricken simple!!! Why can't i find an app that does this?!
 

SpetsnaZ99

macrumors member
Apr 27, 2012
69
1
UK
I Think this may do what you want:-

Copy and paste the following into new script. Add your Username to the code in the first line. Run the script. You should see a List window pop up, now start your task, once youve finished your task select it from the list then click on the "This Task" button, the window will refresh and you should see a new text file on the desktop, carry on with your tasks, selecting the task youve just finished clicking the "This Task" button each time. when your finished click "Cancel" to end the script. You can then open the text document and view your task times. You can also add extra tasks to the 'Choose From' list if you wish.
------------------------------->>>>>


Code:
--Path to desktop file
set MyFile to POSIX file "/users/PUT YOUR USERNAME HERE/desktop/Task Time.txt"
--This repeat loop will continually rerun the script until the 'Cancel' button is clicked
repeat
	set StartDate to current date
	choose from list {"Read Book", "Write Notes", "Walk Dog"} with title "Task Time" with prompt "Choose a task" OK button name "This Task" cancel button name "Cancel"
	
	set MyTask to result
	if result = false then
		exit repeat
	end if
	
	set TaskDate to ((current date) - StartDate)
	
	--When subtracting one date from another date in Applescript gives a result value in seconds
	--The following will convert the result TaskDate into HH:MM:SS
	set oNum to TaskDate
	set NumHour to oNum div hours
	set temp to oNum mod hours
	set NumMin to temp div minutes
	set NumSec to temp mod minutes
	if NumHour < 10 then set NumHour to "0" & NumHour
	if NumMin < 10 then set NumMin to "0" & NumMin
	if NumSec < 10 then set NumSec to "0" & NumSec
	set finalTime to NumHour & ":" & NumMin & ":" & NumSec as string
	set MyData to "" & MyTask & " - " & finalTime & "" & return
	
	--The Task and time spent is now appended to a text file
	try
		open for access MyFile with write permission
		write (MyData) to MyFile starting at eof
		close access MyFile
	on error
		try
			close access MyFile
		end try
	end try
end repeat
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.