This code will set all registry values for every existing contact, so they are on top (set
bFloatOnTop to
true) or not on top (set
bFloatOnTop to
false).
Note that this code needs to be executed each time you add new contacts to Messenger (if you're going to add them as a desktop contact), since Plus! always sets them on top by default.
This code also doesn't change the current window settings of the contact already on top.
In other words, run this code from a script and restart Messenger to get the full effect.
code:
var nKeyLocation = -2147483647 /* HKEY_CURRENT_USER */;
var sRegPath = "Software\\Patchou\\Messenger Plus! Live\\" + Messenger.MyEmail + "\\Contacts";
var bFloatOnTop = true;
// Uses WMI to enumerate registry subkeys and set a DWORD value
var oREG = new ActiveXObject("WbemScripting.SWbemLocator").ConnectServer(".", "root\\default").Get("StdRegProv");
var oMethod = oREG.Methods_.Item("EnumKey");
var oInParam = oMethod.InParameters.SpawnInstance_();
oInParam.hDefKey = nKeyLocation;
oInParam.sSubKeyName = sRegPath;
var aNames = oREG.ExecMethod_(oMethod.Name, oInParam).sNames.toArray();
for (i in aNames) {
oREG.SetDWORDValue(nKeyLocation, sRegPath + "\\" + aNames[i], "FloatTopMost", bFloatOnTop ? 1 : 0);
}