Shoutbox

[REQUEST] Activity statistics - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [REQUEST] Activity statistics (/showthread.php?tid=84898)

[REQUEST] Activity statistics by Chikara on 07-18-2008 at 11:31 AM

How about just a simple script to monitor when i use my messenger the most?

Idea:
Simple: just save how many messages the user recieves per hour so that the user could see, whether he/she uses messenger the most in the evening or in the morning.

Reason:
It's of no use to be online in messenger, if there is no-one to talk to. Therefore inactive time could be used otherwise and messenger could be used more efficiently.

Please help, i couldn't do this myself. :P


RE: [REQUEST] Activity statistics by T-PO on 07-18-2008 at 02:44 PM

Hello,

Maybe the Stat Center script can help you.

http://www.msgpluslive.net/scripts/view/245-Stat-Center/

Regards,

T-PO


RE: Stat center by Chikara on 07-19-2008 at 08:00 AM

Current situation:
I am well aware of the stat center and i'm looking for something like. This Stat center is an excellent script that collect various information about how many messages the user sends and recieves and what kinds of messagetypes the user sends and recieves. Sadly though Stat center only tells me that i've been online 88 hours in the past 12 days so it gives no clue when my friends would be the most easily avaliable on arvage and on the other hand what part of my messenger usage is such idle time that should be used otherwise.

Solution 1:
Stat center could be further developed also to write down which hours of the day are the most active and which hours of the day should be spent off computer. Stat center just happens to be already such a large script that it would be somewhat pain in the ass to add this feature to it. After all Stat center has its own statistics for each and every contact on the list already.

Solution 2:
A new script could be made just to monitor on which hours are the most messages recieved. As i see this, this very very simple script would only store 24 values and provide some way to look at those 24 values to see when messenger would be used most efficiently.

- 24 values, one for each hour of the day
- code needed to store those 24 values
- code needed to know how much the time is
- code needed to add one to the value currently in progress
  whenever a message arrives
- some sort of viewer for the information collected

Could someone help me on this, shouldn't take too long :P
I would do this myself if i could. :D


RE: [REQUEST] Activity statistics by T-PO on 07-20-2008 at 03:45 PM

Hi Chikara,

I FULLY back up your request.

I'm using "XOBNI" (www.xobni.com), an MS Outlook add-in that has this kind of functionality for all my email contacts. Works GREAT!!
You can see very easily at what time in a day the contact is  awake/working/spamming...

Would be great to have this also working for Messenger!

Unfortunately, I'm also not able to make this happen. Hopefully some scriptdesigner will pick this up!
(So please have a look at Xobni to see a working example for email...)

Regards,

T-PO


RE: [REQUEST] Activity statistics by Spunky on 07-20-2008 at 10:29 PM

If you could plot results on a graph too that would be good :p


RE: [REQUEST] Activity statistics by T-PO on 07-22-2008 at 09:27 AM

Considering what you can do with Plus! RPG, that couldn't be too difficult for you Spunky!;)

Regards,

T-PO


RE: [REQUEST] Activity statistics by Spunky on 07-22-2008 at 05:36 PM

I'm already working on this as a script (sans the graph lol)


RE: [REQUEST] Activity statistics by SmokingCookie on 07-22-2008 at 07:02 PM

@SpunkyLoveMuff:

Perhaps you can use some Word API/ActiveX function to draw a graph and use an ImageElement to display it..

EDIT::

For the graph: what about having a window with MANY StaticControls with a single "." in them, creating a line (eg <Control Id="Graph_999*999"> ..... for a line at (999,999)  ). One can then use PlusWnd::setControlText("Graph_999*999","."); to fill in the line...


RE: [REQUEST] Activity statistics by CookieRevised on 07-22-2008 at 07:30 PM

quote:
Originally posted by T-PO
Hi Chikara,

I FULLY back up your request.

I'm using "XOBNI" (www.xobni.com), an MS Outlook add-in that has this kind of functionality for all my email contacts. Works GREAT!!
You can see very easily at what time in a day the contact is  awake/working/spamming...

Would be great to have this also working for Messenger!
Although that is totally different than what Chikara explained here:
quote:
Originally posted by Chikara
Solution 2:
A new script could be made just to monitor on which hours are the most messages recieved. As i see this, this very very simple script would only store 24 values and provide some way to look at those 24 values to see when messenger would be used most efficiently.

- 24 values, one for each hour of the day
- code needed to store those 24 values
- code needed to know how much the time is
- code needed to add one to the value currently in progress
  whenever a message arrives
- some sort of viewer for the information collected
Chikara means a stats script which keeps track on the amount of messages for each hour in the day. You are talking about individual contact stats, much like what the script Stat Center already does.

---------------------------------------

quote:
Originally posted by SmokingCookie
@SpunkyLoveMuff:

Perhaps you can use some Word API/ActiveX function to draw a graph and use an ImageElement to display it..
Why such a really long and clumsy/dodgy way? You can easly make your own graph by drawing some lines of your own.

;)


EDIT:
quote:
Originally posted by SmokingCookie
Yeah, but then I'll need to think and I've got vacation ( = bad combination ) :p

Anyhow it'll be loads of work doing such things in a script, without using external libraries/ActiveXs..
You realy need that vacation :p it's dead easy ;)

RE: [REQUEST] Activity statistics by SmokingCookie on 07-22-2008 at 07:47 PM

Yeah, but then I'll need to think and I've got vacation ( = bad combination ) :p

Anyhow it'll be loads of work doing such things in a script, without using external libraries/ActiveXs..


RE: RE: [REQUEST] Activity statistics by Chikara on 07-22-2008 at 08:49 PM

quote:
Originally posted by CookieRevised
Chikara means a stats script which keeps track on the amount of messages for each hour in the day. You are talking about individual contact stats, much like what the script Stat Center already does.

You have understood me right, thank you for that.

I indeed meant the total amount of messages for each hour in the day. This very same information could be tracked with each contact seperately, but that would sound more like a new feature to Stat Center.

I would like to keep this simple, but i regard this idea to be entirely free for anyone to develop.
RE: [REQUEST] Activity statistics by SmokingCookie on 07-22-2008 at 08:58 PM

I might be ale to do such a thing, although it'll take me some time...

And I'll inform you if not (which isn't very likely since I know how Date objects work and I have some functions ready for use within such a script :P ).


RE: [REQUEST] Activity statistics by Spunky on 07-23-2008 at 08:16 AM

As I said, I already made most of this. I just need to add one more function and then do the GUI


RE: [REQUEST] Activity statistics by SmokingCookie on 07-23-2008 at 06:06 PM

Okay, then I'll have some time free :)


RE: RE: [REQUEST] Activity statistics by T-PO on 07-24-2008 at 01:14 PM

quote:
Originally posted by CookieRevised

Chikara means a stats script which keeps track on the amount of messages for each hour in the day. You are talking about individual contact stats, much like what the script Stat Center already does.


I know and I already pointed Chakira to this script earlier... However that script does not keep track of the timings...

But, now I know Spunky is working on this...
As Hannibal would say: I love it when a plan comes together...

Regards,

T-PO
RE: [REQUEST] Activity statistics by Spunky on 07-24-2008 at 10:29 PM

Ok, finished... Just needs to be tested as mine won't do one specific thing atm ^o)


RE: RE: [REQUEST] Activity statistics by T-PO on 07-25-2008 at 07:02 AM

quote:
Originally posted by SpunkyLoveMuff
Ok, finished... Just needs to be tested as mine won't do one specific thing atm ^o)



Hello Spunky,

I downloaded the script. Graph looks nice but I have a question:

1. What does the graph show on the Y-axis (e.g. what does the script register?)
2. In my case the graph shows a bar on the 6 and 7 o'clock in the morning. I suppose this means there was some activity at these times. I'm pretty sure I was not awake on those hours, so I suppose this is not correct...

Can you please have a look?

Regards,

T-PO
RE: [REQUEST] Activity statistics by SmokingCookie on 07-25-2008 at 07:17 AM

Good morning ^o) ..

I've downloaded the script and... There's a bug:

I woke up at 8:55, signed into Messenger at 9:00 (I like things going fast :P ) and haven't sent a single message. The graph, however, shows activity at 6:00 and 7:00.. I'm sure that most people don't use their computers at these hours (I might be wrong, but it's just a thought)..?

EDIT::

And it shows 20/07/2008, while today is 25/07/2008

EDIT 2::

Script debugger shows errors:

code:
function OnViewerEvent_CtrlClicked(PlusWnd, ControlId){
    if(ControlId === "BtnNext"){
        chart_number++;
        wnd.ImageElmt_SetImageFile("chart",charts[chart_number]);
    }
    if(ControlId === "BtnBack"){
        chart_number--;
        wnd.ImageElmt_SetImageFile("chart",charts[chart_number]);
    }
}


probably should be
code:
function OnViewerEvent_CtrlClicked(PlusWnd, ControlId){
    if(ControlId === "BtnNext"){
        chart_number++;
        PlusWnd.ImageElmt_SetImageFile("chart",charts[chart_number]);
    }
    if(ControlId === "BtnBack"){
        chart_number--;
        PlusWnd.ImageElmt_SetImageFile("chart",charts[chart_number]);
    }
}


EDIT 3:: (wow :| )

Now that I have corrected this error on my pc, the Next and Prev buttons work, but as I click them, the date disappears..

Giving the window focus, focussing on another and focussing back makes parts of the graph disappear..
RE: [REQUEST] Activity statistics by Spunky on 07-25-2008 at 09:19 AM

The graph you see is just a demo, to show you what should appear. I have already fixed the buttons in my own build, which I will post later today, the only problem I have is that the charts don't seem to download


RE: [REQUEST] Activity statistics by CookieRevised on 07-25-2008 at 10:38 AM

I wanted to wait until you released the script to comment on this. But this script is, as of yet, just still a POC (proof of concept) and doesn't work and seems to complicate things too much (imho).

Anyways, are you going to store all stats seperatly per date? If so, I strongly suggest not to use the registry. It will fill up quickly with (actually many times useless) data in that case. Use XML or maybe even a database for that, much more efficient.

If you plan to simply store 24 DWORDs (that's what I would do, is alo what the OP requested), thus not storing the stats per date, but simply the totals, then the registry is choice number one of course.

PS: all the initializing and putting "hour_of_day[i] = 0" codelines are not needed. Just grab what is in the registry (and if nothing is there, then set the value to 0) when the user signs in, and put it back in the registry when the user signs out.

Also, don't forget to make a check if the recieved message comes from a contact or from yourself. Otherwise it will count your own messages twice.

quote:
Originally posted by SpunkyLoveMuff
the only problem I have is that the charts don't seem to download
The url is wrong...

http://www.chart.apis.google.com/

and as said above, the script is actually made too complicated then it needs to be; which is probably part of the cause of the errors.


$0,02

;)


PS: although you can easly make your own chart by drawing a few lines, the use of the Google Chart API is a nice. Never thought of that...cool. (y)
RE: [REQUEST] Activity statistics by Spunky on 07-25-2008 at 12:51 PM

quote:
Originally posted by CookieRevised
The url is wrong...

http://www.chart.apis.google.com/

Neither works in the script; the www needs to be removed for it to work in the browser though

I may store all the information in xml files, but the registry was a quick and lazy way of doing things tbh.
Wait a minute by Chikara on 07-30-2008 at 04:39 PM

Surely the graph would look cool and be rather clear way of looking information about messenger usage.

However i'd like to offer another way to look at the information collected.

Just calculate the arvage activity of an hour of the day and compere each value of activity to that.
If an activity value of some hour is more than douple the arvage, it could very easily be shown with green text color.
If an acticity value of some hour is less than half of the arvage, it could very easily be shown with red text color.
And all values in between could be shown with black or white color depending on the color of the background.

This green > black/white > red, with 200 % > 200-50% > 50 % may sound rough but i dont think anyone spends 50% of the day chatting in messenger.


RE: [REQUEST] Activity statistics by T-PO on 08-15-2008 at 04:25 PM

Any update on this, Spunky?

Regards,

T-PO