This doesn't seem to work
. Here is the debug
.
quote:
Script is starting
Script is now loaded and ready
Function called: OnEvent_Initialize
Error: Invalid root in registry key "HKCU\SOFTWARE\Patchou\Messenger Plus! Live\GlobalSettings\Scripts\Sync\Settings\name@domain.com\cSyncGTalk"..
Line: 94. Code: -2147024894.
Function OnEvent_Initialize returned an error. Code: -2147352567
Function called: OnGetScriptMenu
Function called: OnEvent_MenuClicked
Error: Invalid root in registry key "HKCU\SOFTWARE\Patchou\Messenger Plus! Live\GlobalSettings\Scripts\Sync\Settings\name@domain.com\cSyncGTalk"..
Line: 94. Code: -2147024894.
Function OnEvent_MenuClicked returned an error. Code: -2147352567
Function called: OnwSettingsEvent_CtrlClicked
Function called: OnwSettingsEvent_CtrlClicked
Function called: OnwSettingsEvent_CtrlClicked
Function called: OnGetScriptMenu
Function called: OnEvent_MenuClicked
Function called: OnEvent_MyStatusChange
Error: Automation server can't create object.
Line: 120. Code: -2146827859.
Function OnEvent_MyStatusChange returned an error. Code: -2147352567
Function called: OnEvent_MyStatusChange
Error: Automation server can't create object.
Line: 120. Code: -2146827859.
Function OnEvent_MyStatusChange returned an error. Code: -2147352567
Function called: OnGetScriptMenu
Function called: OnEvent_MenuClicked
Function called: OnwSettingsEvent_CtrlClicked
Script has been stopped
Script is starting
Script is now loaded and ready
Function called: OnEvent_Initialize
Error: Automation server can't create object.
Line: 120. Code: -2146827859.
Function OnEvent_Initialize returned an error. Code: -2147352567
First of all you should use try statements for accessing the registry. The key might not exist on the first install.
code:
function LoadSetting (sKey, sDefault){
var oShell = new ActiveXObject("WScript.Shell");
try
return oShell.RegRead(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\" + sKey);
catch(error)
return sDefault;
}
And the second problem is with the ActiveXObject "Skype4COM.Skype". Its just that your dll isn't getting registered properly
.