How do I prevent a counter object from reseting

Oct 12, 2007 at 11:18pm

How do I prevent a counter object from reseting

Hi list…

probably is simple, but can’t find a solution…
I have a small project to do a kind of counter to check how long people stays on the pc daily.
for example if on monday the couter gives me a total of 5 hours, because the computer is turned off on the end of the day, that value of 5 hs is lost and on Tuesday counter starts from zero again… I have tryed to use autopattr to store the value of 5 hs and send a message to counter to set min as 5hs but everytime I start the counter it gets reset to 0..AAAAAAAAAAAAAAAAAAAAAAAAAAAH please help….

Cheers

#34155
Oct 13, 2007 at 12:02am

perhaps something like that?

max v2;
#N vpatcher 75 52 675 452;
#P window setfont “Sans Serif” 9.;
#P number 306 137 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 188 137 48 196617 loadbang;
#N counter 0 1 2000;
#X flags 0 0;
#P newobj 241 103 89 196617 counter 0 1 2000;
#P number 241 80 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 240 158 50 196617 10;
#P newex 240 136 62 196617 prepend set;
#P fasten 3 0 0 0 245 122;
#P connect 0 0 1 0;
#P fasten 4 0 1 0 193 156 245 156;
#P connect 2 0 3 0;
#P fasten 1 0 3 3 245 185 383 185 383 82 303 82;
#P fasten 3 0 5 0 246 128 311 128;
#P pop;

hth
hans

hans w. koch
im krahnenhof 11
d-50668 koeln
+49-221-554902
http://www.hans-w-koch.net

Am 13.10.2007 um 01:18 schrieb Antonio Passaro:

>
> Hi list…
>
> probably is simple, but can’t find a solution…
> I have a small project to do a kind of counter to check how long
> people stays on the pc daily.
> for example if on monday the couter gives me a total of 5 hours,
> because the computer is turned off on the end of the day, that
> value of 5 hs is lost and on Tuesday counter starts from zero
> again… I have tryed to use autopattr to store the value of 5 hs
> and send a message to counter to set min as 5hs but everytime I
> start the counter it gets reset to 0..AAAAAAAAAAAAAAAAAAAAAAAAAAAH
> please help….
>
> Cheers
>
>
>
> –
> _____________________________________
>
> Cheers,
> TONI.BIRD
>
> “Still crazy after all these years”
> _____________________________________

#114837
Oct 13, 2007 at 12:22am

Hi mate
That works really well.. was under my nose…. Bet I need some sleep…. cheers

Thanks so much…

#114838

You must be logged in to reply to this topic.