How do I save data????? - 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: How do I save data????? (/showthread.php?tid=97911) How do I save data????? by Infinity8888 on 07-01-2011 at 12:23 PM
Hello Everyone RE: How do I save data????? by matty on 07-01-2011 at 12:44 PM What exactly are you trying to save? RE: How do I save data????? by Infinity8888 on 07-01-2011 at 10:56 PM I wanna make a script that counts how many times I spoke to a contact. I need to save that number every time I close the chat window let's say RE: How do I save data????? by Carol6Sweet on 07-02-2011 at 01:13 PM I am interested in knowing the code so if you get it from anywhere please share. RE: How do I save data????? by Infinity8888 on 07-02-2011 at 03:51 PM
There's no code for the moment. I programmed my app on MatLab, and generated an exe file. But it sucks to have to write the name of the person everytime, so that's why I wanna do it as a messenger script. RE: How do I save data????? by MeEtc on 07-02-2011 at 05:28 PM There are 2 ways that you can do this, you can save data to a file or to the Windows registry. Take a look on the scripts forum and other scripts RE: How do I save data????? by Spunky on 07-02-2011 at 06:11 PM
quote: How many messages or how many times a window was opened? RE: How do I save data????? by Infinity8888 on 07-02-2011 at 06:19 PM
How many times a window was opened for example. The algorithm is simple - as I said I've already done it all in Matlab - I just don't know how to save data with jscript, and this wasn't discussed in the messenger plus documentation. Is it just a simple instruction? RE: How do I save data????? by Spunky on 07-02-2011 at 06:51 PM
The best analogue I can think of to learn from would be a win32 read/write example. Some things need to be changed though still such as ActiveXObject instead of create object and no constants are defined so you have to explicitly assign these values. There may be an example somewhere around here. I'll see what I can dig up (getting son to sleep atm) js code: Hopefully you can use bits of that for what you want; it's all there Although I'm sure there should be an f.Close(); before the return. This is taken from MSDN though It can be put into two functions: js code: RE: How do I save data????? by Infinity8888 on 07-02-2011 at 08:59 PM
Oh thanx this is working. I've read about XML but if I can use this to write in txt files, it doesn't bother me RE: RE: How do I save data????? by CookieRevised on 07-02-2011 at 10:43 PM
quote:Because the Messenger Plus! Scripting documentation help file (or the online docs) is about... well... Messenger Plus! stuff. It is specifically about Plus! objects, Plus! functions and Plus! events in the integrated scripting language. All the other normal things you could do in JScript are out of scope of this documentation. So, writing to files and all kind of other stuff is pure JScript and nothing todo with Plus! specifically and thus you'll find info about that in the Windows Scripting Documentation help file (or online docs) instead. There you'll find example code as posted by Spunky. Although, there are some small errors in Spunky's code. Below, the fixed lines in yellow: js code: RE: How do I save data????? by Spunky on 07-02-2011 at 11:48 PM
quote: Damn, was in a rush Good to know that the Close() was needed though RE: How do I save data????? by Infinity8888 on 07-03-2011 at 05:22 PM
Yeah I added the Close() yesterday because I wasn't able to erase the files I was working with because they were still used by messenger. |