ScriptSpot

Forum topic · General Scripting

How it works? - Time Tracker (a.k.a. I Also Know What You Did Last Summer)

By SIL · 2012-01-16

Description
Comments (11)

Ofer Zelichover · 2012-01-24

Hi,

Glad to hear it's working for you now.
Thanks for the suggestions. I hope to find some free time to update the timeTracker, there's quite a lot that I'd like to change in it :)

Cheers,
o

SIL · 2012-01-24

Another idea.

Maybe it makes sense to add callbacks.addscript # filePostOpen to automatically activate the timer, if the max - file is in the database.

SIL · 2012-01-23

It looks good. Thank you!

There is a comment - after selecting the project in the "Current File Is Assigned To Project:" - automatically turn off button - "Change"

There is an idea - add the event to track time spent on rendering ... But you can before the final rendering off the tracking.

Ofer Zelichover · 2012-01-21

Hi,

I've posted a new version on my website. You can get it at http://oferz.com/maxscripts.php#timeReporter
It should solve the issue your were having. Please test it and let me know how it works.

Cheers,
o

SIL · 2012-01-21

Hello!

Good news! Thank you!

Ofer Zelichover · 2012-01-21

Hi,

OK, I found the problem. The problem is that timeReporter expects the "/" character as delimiter for dates, and on your machine the date uses a "." character as delimiter. I'll try to fix this soon.

Cheers,
o

Ofer Zelichover · 2012-01-20

Thanks for uploading your data. I'll look at it soon. What version of max are you using?

Thanks,
o

Unfortunately still without success.

SIL · 2012-10-26

Hello!

Unfortunately still without success.

After "------------------------------------------------ ----------------" always empty.
I tried to read the code, but it is too complicated for me. Especially the part with rpt-files.
I tried to run timeTracker + timeReporter on another computer - same result - a blank report.

I uploaded my data folder. If not hard - you could get from her record? According to the records - should be 1 minute.

Ofer Zelichover · 2012-01-19

Hi,

OK, here's how it works behind the scenes: at the specified interval (set in the general settings) the tmpSession.dat file is updated with the time of the current session. Once a session is closed, this information is saved into sessions.dat and the tmpSession.dat file is deleted. This mechanism was created for 2 reasons:
1. to speed the writing process as much as possible (this way the file is very small and can be updated very fast, whereas the sessions.dat file cat become quite large and might take longer to append to).
2. to avoid session data loss in case of a crash.
A session is closed when one of the following happens: a new file is loaded, the scene is reset (or file > new is used), when max is closed (or crashes), or when one of the session's parameters is changed in the timeTracker UI. Only then the session data is actually saved into the sessions.dat file, and only then will it show in the reports.
Perhaps you ran the report before closing the session?

As for your second question, the timeTrackerStratup.ms is actually supposed to be copied to [max_root]\stdplugs\stdscripts. If it's already there, you don't need it in the scripts\startup folder as well.

hOpe this helps,
o

SIL · 2012-01-18

Hello Ofer Zelichover!

I'm glad to see your response. Thank you very much!

1) I did everything as you described, but did not get the total time through timeReporter greater than zero. The file tmpSession.dat - sessionTime = 0:0:2:0, but projects.dat - = 0:0:0:0, but the file sessions.dat all is well. And timeReporter shows always blank reports or Total Time: 0:0:0:0.

2) The second question - during the installation file startup \ timeTrackerStratup.ms not copied to the scripts \ startup - is this normal? * I manually copied it from timeTracker-v0_42.mzp

Ofer Zelichover · 2012-01-17

Hi,

Well, you first have to set it up: create users, clients and projects - use the different rollouts for this. Then you need to select the right user and project for the current file you're working on - use the change buttons in the "Current Session" rollout. Lastly, start tracking your time by pressing the "Work in Progress" button. When you're not working on the project, click the "Pause Time Tracking" button.
You need to set these parameters up for every file you want to track, but only once - these parameters are saved in the file.

I hope this can get you started.

Cheers,
o