What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » path of historique storage directorie of MP!live

path of historique storage directorie of MP!live
Author: Message:
mondator
New Member
*


Posts: 10
Joined: Aug 2007
O.P. path of historique storage directorie of MP!live
how i can know the directory where mp!live stocke log of discution
08-13-2007 07:12 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: path of historique storage directorie of MP!live
Read this registry key

HKEY_CURRENT_USER\Software\Patchou\Messenger Plus! Live\%Email%\Preferences\LogsDirectory it is a REG_SZ

Where %Email% is the email of the person.

This post was edited on 08-13-2007 at 07:20 PM by matty.
08-13-2007 07:20 PM
Profile E-Mail PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: path of historique storage directorie of MP!live
This is the way I'd do it:
code:
var RegScriptPath = MsgPlus.ScriptRegPath; //Get the script registry path
var RegPrefsPath = RegScriptPath.substr(0, RegScriptPath.indexOf("GlobalSettings")) + Messenger.MyEmail + "\\Preferences"; //Get the Plus! preferences path
var sPath = new ActiveXObject("WScript.Shell").RegRead(RegPrefsPath + "\\LogsDirectory"); //Get Plus!' default log directory

EDIT:
@ matty: Note that it's possible that that path changes in a future Plus! version. Therefore, I more like to get the path based on the script's registry path. ;)
And yes, I know that it's more recommended to use Win32 API functions to read the key but I leave that for you to choose whether you want to implement such functions.

This post was edited on 08-13-2007 at 07:25 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
08-13-2007 07:22 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: path of historique storage directorie of MP!live
I was just stating where the key is that he/she needs to read as you see no code I posted. What would be even better would be to read the EnableChatLog DWORD value and read based on if that is 1 or 0.
08-13-2007 08:05 PM
Profile E-Mail PM Find Quote Report
mondator
New Member
*


Posts: 10
Joined: Aug 2007
O.P. RE: path of historique storage directorie of MP!live
thanks mattike thats perfect but how can have the list of name of files ho exist in the directory?
08-13-2007 08:26 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: path of historique storage directorie of MP!live
Use the Win32 API FindFirstFile and FindNextFile.
08-13-2007 08:38 PM
Profile E-Mail PM Find Quote Report
mondator
New Member
*


Posts: 10
Joined: Aug 2007
O.P. RE: path of historique storage directorie of MP!live
thanks matty but u always and i dont know wy u give only the headline i need a one hour with your instruction to find exactly the right code can u be more nice and next time be more explination and give some piece of code?

This post was edited on 08-14-2007 at 12:23 AM by mondator.
08-14-2007 12:21 AM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: path of historique storage directorie of MP!live
The reason why I don't just post code now a days is because everyone justs asks without doing any research. There is a reason there is MSDN from Microsoft. It is to tell you how to use the APIs. No offence but you have only asked for code from what I have seen without actually doing any yourself.

Why don't you try to do something yourself without constantly asking for us to just provide you with the code? It isn't that hard at all!

code:
/*
    Name:     GetDirectoryStructure
    Purpose:    Create a list of all the files from a given location on the disc
    Parameters:    sPath - Path to get all the files from
            includePath - If true, will include the full path to the filename, if false will only display the filename
    Return:    An array of the files from the path
*/

function GetDirectoryStructure(sPath, includePath) {
    var aFileNames = new Array();
    var Win32_Find_Data = Interop.Allocate(592);
    var hSearch = Interop.Call('kernel32', 'FindFirstFileW', sPath + '*', Win32_Find_Data);
    var hResult;
    while(hResult != 0){
        if((Win32_Find_Data.ReadString(44) !== '.') && (Win32_Find_Data.ReadString(44) !== '..') && !(Win32_Find_Data.ReadDWORD(0) & 0x10)){
            aFileNames.push ((includePath ? sPath : '')+Win32_Find_Data.ReadString(44));
        }
        hResult = Interop.Call('kernel32', 'FindNextFileW', hSearch, Win32_Find_Data)
    }
    Interop.Call('kernel32', 'FindClose', hSearch);
    return aFileNames;
}

This post was edited on 08-14-2007 at 03:02 AM by matty.
08-14-2007 12:54 AM
Profile E-Mail PM Find Quote Report
mondator
New Member
*


Posts: 10
Joined: Aug 2007
O.P. RE: path of historique storage directorie of MP!live
thanks matty for advice i do this but some time i spent a lot of time for a very small thing ho can people give it in 3s so that save alot of time and give u chanse to do more importante things :D

This post was edited on 08-14-2007 at 10:15 AM by mondator.
08-14-2007 10:14 AM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: path of historique storage directorie of MP!live
But the point is you don't learn by someone just giving you code.
08-14-2007 03:44 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On