What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Help] Save strings

[Help] Save strings
Author: Message:
Shondoit
Full Member
***

Avatar
Hmm, Just Me...

Posts: 227
Reputation: 15
35 / Male / Flag
Joined: Jul 2006
RE: [Help] Save strings
Personaly, I work most with the registry, when you use a per user setting, your script directory will become quite full

This works better, imo
When you call ReadRegistry and the key does not exist, it will write the initvalue to the registry
That way you can give start string when your script runs for the first time
code:
function WriteRegistry (key, value) {
  var Shell = new ActiveXObject("WScript.Shell");
    return Shell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\" + key, value, "REG_SZ");
}

function ReadRegistry (key) {
  var Shell = new ActiveXObject("WScript.Shell");
  try {
    return Shell.RegRead(MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\" + key);
  } catch (e) {
    WriteRegistry(key, initvalue);
    return initvalue;
  }
}

function RemoveRegistry (key) {
  var Shell = new ActiveXObject("Wscript.Shell");
  return Shell.RegDelete(MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\" + key);
}

My scripts:                            [Image: shondoit.gif]
+ Timezone
+ Camelo
+ Multisearch
08-08-2006 08:19 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Help] Save strings - by Anton on 08-03-2006 at 04:38 PM
RE: [Help] Save strings - by Huhu_Manix on 08-03-2006 at 06:24 PM
RE: [Help] Save strings - by Ezra on 08-03-2006 at 07:36 PM
RE: RE: [Help] Save strings - by Anton on 08-04-2006 at 01:50 PM
RE: [Help] Save strings - by Huhu_Manix on 08-04-2006 at 01:56 PM
RE: [Help] Save strings - by RaceProUK on 08-04-2006 at 01:58 PM
RE: [Help] Save strings - by Anton on 08-04-2006 at 02:38 PM
RE: [Help] Save strings - by -dt- on 08-04-2006 at 03:13 PM
RE: [Help] Save strings - by Anton on 08-08-2006 at 07:16 PM
RE: [Help] Save strings - by Shondoit on 08-08-2006 at 08:19 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