What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [HELP] Store variable

[HELP] Store variable
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: [HELP] Store variable
  • Registry
    Interesting for: local preferences
    Application: use the Windows Script Host Shell object.
    js code:
    var oWshShell = new ActiveXObject("WScript.Shell");
    //Write to a key value
    oWshShell.RegWrite(MsgPlus.ScriptRegPath + "myvar", 3, "REG_DWORD");
    //Read a key value
    var myvar = oWshShell.RegRead(MsgPlus.ScriptRegPath + "myvar");
    Alternatively, you can use the original Win32 functions to do this, but this requires more advanced coding. You could also look at other scripts for registry functions, such as my own Countdown Live in "Registry.js".
  • XML
    Interesting for: portable preferences
    Application: use the XMLDOM.
  • Text file
    Application: use the FileSystemObject or the Win32 ReadFile function.
  • INI file
    Interesting for: language files and preferences
    Application: use the FileSystemObject to read the file and parse it afterwards, or use GetPrivateProfileString if you're not going to make many calls.
For more information about the usage, try to search the forums! Many methods have already been covered here. ;)

This post was edited on 03-08-2009 at 05:14 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!
03-08-2009 05:13 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[HELP] Store variable - by hajani on 03-08-2009 at 04:08 PM
RE: [HELP] Store variable - by matty on 03-08-2009 at 04:29 PM
RE: [HELP] Store variable - by hajani on 03-08-2009 at 04:33 PM
RE: [HELP] Store variable - by matty on 03-08-2009 at 04:41 PM
RE: [HELP] Store variable - by hajani on 03-08-2009 at 04:49 PM
RE: [HELP] Store variable - by Matti on 03-08-2009 at 05:13 PM
RE: [HELP] Store variable - by hajani on 03-08-2009 at 05:58 PM
RE: [HELP] Store variable - by matty on 03-08-2009 at 06:14 PM
RE: [HELP] Store variable - by Matti on 03-08-2009 at 07:22 PM


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