Shoutbox

[Request] Log Script - 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] Log Script (/showthread.php?tid=75120)

[Request] Log Script by Jona on 06-06-2007 at 11:55 AM

Hello, I need a little script that logs text a contact says. Something like this:

If the contact says "!log Blabla" must the text "Blabla" been saved in a txt file on my PC. If this happens multiple times, al texts must be saved in the same txt file. Has anyone an idea how to do this?

Thx :)

(sorry, i'm not so good in english)


--EDIT---
Better example:

Constact says:
!log Blabla
(Message will now be saved in log.txt)
I says (automatic):
Saved!

Constact 2 says:
!log Blabla 2
(Message will now be saved in log.txt)
I says (automatic):
Saved!

And now, log.txt sees like this:
Blabla
Blabla 2
-----------------------
Thaks to people who want to help me :)


RE: [Request] Log Script by roflmao456 on 06-07-2007 at 03:20 AM

Hi :D

Here's your requested script..

But keep in mind that the FSO object in this script will not save EVERY * message.



* it is delayed for about 7 - 10 seconds before it can save again.. otherwise it will print 'Access Denied' in the debug


It saves in it's Script directory..

For example: C:\Program Files\Messenger Plus! Live\Scripts\Logger\log.txt

You can change this. just edit the script and find the first variable (just below the comments {green text})

so if you want it to save to your desktop, you put it as:

code:
var dirSave = "%USERPROFILE%\\Desktop";

You can also change the filename of the file: log.txt

Have fun.
RE: [Request] Log Script by KatieScarlett on 06-07-2007 at 07:51 AM

I think this feature is available in Messenger Plus! Live, no? *-)
It's Chat Logging, you can choose whether to save it as HTML or TXT, and as well, you can choose the location on where to save it, so why need a script?

KatieScarlett.


RE: [Request] Log Script by Ezra on 06-07-2007 at 08:08 AM

quote:
Originally posted by KatieScarlett
But keep in mind that the FSO object in this script will not save EVERY * message.



* it is delayed for about 7 - 10 seconds before it can save again.. otherwise it will print 'Access Denied' in the debug

This is easily fixed by using a buffer, just save all the messages to a buffer and write this buffer out to the file every say 10 secs.

You could also maybe use the Windows WriteFile API this might not have this 7 seconds restriction, but still a buffer would be good.
RE: [Request] Log Script by scott2010_h on 06-07-2007 at 08:55 AM

roflmao456 take more time on your scripts
there were a couple of mistakes/bugs in your script

but anyways i added a few more option you can find them inside the script and it should work with with out that 7-10 second delay.


RE: [Request] Log Script by Jona on 06-07-2007 at 08:46 PM

Realy thanks :D

--EDIT--
it doesn't work ^o)

--EDIT AGAIN--
Said nothing xD
Thanks for the script!

--EDIT 3--
To solve a little problem, delete this in the script:

code:
+ "\n"