Hello I am initial in Javascript and I have a problem with my script
I am French, do not use too much word to complicate because I would not understand
Script :
JScript code:
var ToastActiveMsg;
var ToastActiveName;
var ToastActivePsm;
var ToastActiveMedia;
var ToastActiveStatus;
var ToastActiveSignout;
var ToastActiveNull;
var ToastActiveOpen;
var ToastActiveClose;
var ActiveBeep;
var ActiveClone;
var ActiveCloneToast;
var ActiveCloneAlert;
var ActiveCloneAlertErreur;
var ActiveCloneAlertExcl;
var ActiveCloneEmail;
var ActiveCloneOpenChat;
var ActiveCloneNull;
var CloneActive = MsgPlus.ScriptRegPath+Messenger.MyUserId+"CloneActiv";
var CloneActiveToast = MsgPlus.ScriptRegPath+Messenger.MyUserId+"CloneActivToast";
var CloneActiveMsg = MsgPlus.ScriptRegPath+Messenger.MyUserId+"ClnActivMsg";
var CloneActiveMsgErreur = MsgPlus.ScriptRegPath+Messenger.MyUserId+"ClnActvMsgErreur";
var CloneActiveMsgExcl = MsgPlus.ScriptRegPath+Messenger.MyUserId+"ClnActivMsgExcl";
var CloneEmail = MsgPlus.ScriptRegPath+Messenger.MyUserId+"Email";
var CloneOpenChat = MsgPlus.ScriptRegPath+Messenger.MyUserId+"OpenChatClone";
var CloneNull = MsgPlus.ScriptRegPath+Messenger.MyUserId+"CloneNull";
var ToastMsg = MsgPlus.ScriptRegPath+Messenger.MyUserId+"ToastMsg";
var ToastName = MsgPlus.ScriptRegPath+Messenger.MyUserId+"ToastName";
var ToastPsm = MsgPlus.ScriptRegPath+Messenger.MyUserId+"ToastPsm";
var ToastMedia = MsgPlus.ScriptRegPath+Messenger.MyUserId+"ToastMedia";
var ToastSignout = MsgPlus.ScriptRegPath+Messenger.MyUserId+"ToastSignout";
var ToastStatus = MsgPlus.ScriptRegPath+Messenger.MyUserId+"ToastStatus";
var Beep_Sound = MsgPlus.ScriptRegPath+Messenger.MyUserId+"Beep_Sound";
var ToastOpen = MsgPlus.ScriptRegPath+Messenger.MyUserId+"ToastOpen";
var ToastClose = MsgPlus.ScriptRegPath+Messenger.MyUserId+"ToastClose";
var ToastNull = MsgPlus.ScriptRegPath+Messenger.MyUserId+"ToastNull";
function OpenWnd(){
var Wnd = MsgPlus.CreateWnd("Options.xml", "Interface")
var Shell = new ActiveXObject("WScript.Shell");
try{ToastActiveMsg = Shell.RegRead(ToastMsg)}
catch(error){ToastActiveMsg = 0}
if(ToastActiveMsg!=0){
Wnd.Button_SetCheckState("ToastMsg", true)}
try{var ToastActiveName = Shell.RegRead(ToastName)}
catch(error){ToastActiveName = 0}
if(ToastActiveName!=0){
Wnd.Button_SetCheckState("ToastName", true)}
try{ToastActivePsm = Shell.RegRead(ToastPsm)}
catch(error){ToastActivePsm = 0}
if(ToastActivePsm!=0){
Wnd.Button_SetCheckState("ToastPsm", true)}
try{ToastActiveStatus = Shell.RegRead(ToastStatus)}
catch(error){ToastActiveStatus = 0}
if(ToastActiveStatus!=0){
Wnd.Button_SetCheckState("ToastStatus", true)}
try{ToastActiveMedia = Shell.RegRead(ToastMedia)}
catch(error){ToastActiveMedia = 0}
if(ToastActiveMedia!=0){
Wnd.Button_SetCheckState("ToastMedia", true)}
try{ToastActiveSignout = Shell.RegRead(ToastSignout)}
catch(error){ToastActiveSignout = 0}
if(ToastActiveSignout!=0){
Wnd.Button_SetCheckState("ToastSignout", true)}
try{ActiveBeep = Shell.RegRead(Beep_Sound)}
catch(error){ActiveBeep = 0}
if(ActiveBeep!=0){
Wnd.Button_SetCheckState("Beep", true)}
try{ToastActiveNull = Shell.RegRead(ToastNull)}
catch(error){ToastActiveNull = 0}
if(ToastActiveNull!=0){
Wnd.Button_SetCheckState("ToastRien", true)}
try{ToastActiveOpen = Shell.RegRead(ToastOpen)}
catch(error){ToastActiveOpen = 0}
if(ToastActiveOpen!=0){
Wnd.Button_SetCheckState("ToastOpen", true)}
try{ToastActiveClose = Shell.RegRead(ToastClose)}
catch(error){ToastActiveClose = 0}
if(ToastActiveClose!=0){
Wnd.Button_SetCheckState("ToastClose", true)}}
function OpenWndClone(){
var Wnd = MsgPlus.CreateWnd("Options.xml", "OptClonage");
Wnd.Combo_AddItem("TypeMsg", "Message Type Erreur");
Wnd.Combo_AddItem("TypeMsg", "Message Type Exclamation");
try{ActiveCloneAlertExcl = Shell.RegRead(CloneActiveMsgExcl)}
catch(error){ActiveCloneAlertExcl = 0}
if(ActiveCloneAlertExcl!=0){
Wnd.Combo_GetCurSel("TypeMsg")==1}
try{ActiveCloneAlertErreur = Shell.RegRead(CloneActiveMsgErreur)}
catch(error){ActiveCloneAlertErreur = 0}
if(ActiveCloneAlertErreur!=0){
Wnd.Combo_GetCurSel("TypeMsg")==2}
try{ActiveClone = Shell.RegRead(CloneActive)}
catch(error){ActiveClone = 0}
if(ActiveClone!=0){
Wnd.Button_SetCheckState("RIENTT", true)}
try{ActiveCloneToast = Shell.RegRead(CloneActiveToast)}
catch(error){ActiveCloneToast = 0}
if(ActiveCloneToast!=0){
Wnd.Button_SetCheckState("ToastAlertClone", true)}
try{ActiveCloneAlert = Shell.RegRead(CloneActiveAlert)}
catch(error){ActiveCloneAlert = 0}
if(ActiveCloneAlert!=0){
Wnd.Button_SetCheckState("ToastAlertExcl", true)}
try{ActiveCloneEmail = Shell.RegRead(CloneActiveEmail)}
catch(error){ActiveCloneEmail = 0}
if(ActiveCloneEmail!=0){
Wnd.Button_SetCheckState("Email", true)}
try{ActiveCloneOpenChat = Shell.RegRead(CloneActiveOpen)}
catch(error){ActiveCloneOpenChat = 0}
if(ActiveCloneOpenChat!=0){
Wnd.Button_SetCheckState("openclone", true)}
try{ActiveCloneNull = Shell.RegRead(CloneActiveNull)}
catch(error){ActiveCloneNull = 0}
if(ActiveCloneNull!=0){
Wnd.Button_SetCheckState("rienfaire", true)}}
function OnOptClonageEvent_ComboSelChanged(Wnd){
var Shell = new ActiveXObject("WScript.Shell");
if(Wnd.Combo_GetCurSel("TypeMsg")==1){
Shell.RegWrite(CloneActiveMsgExcl, -1)
Shell.RegWrite(CloneActiveErreur, 0)
}else{
Shell.RegWrite(CloneActiveMsgExcl, 0)
Shell.RegWrite(CloneActiveMsgErreur, -1)}}
function OnInterfaceEvent_CtrlClicked(PlusWnd, ControlId){
var Shell = new ActiveXObject("WScript.Shell");
if(ControlId == "Sauv"){
if(PlusWnd.Button_IsChecked("ToastMsg"))Shell.RegWrite(ToastMsg, -1);
if(PlusWnd.Button_IsChecked("ToastMsg")==false)Shell.RegWrite(ToastMsg, 0);
if(PlusWnd.Button_IsChecked("ToastName"))Shell.RegWrite(ToastName, -1);
if(PlusWnd.Button_IsChecked("ToastName")==false)Shell.RegWrite(ToastName, 0);
if(PlusWnd.Button_IsChecked("ToastPsm"))Shell.RegWrite(ToastPsm, -1);
if(PlusWnd.Button_IsChecked("ToastPsm")==false)Shell.RegWrite(ToastPsm, 0);
if(PlusWnd.Button_IsChecked("ToastStatus"))Shell.RegWrite(ToastStatus, -1);
if(PlusWnd.Button_IsChecked("ToastStatus")==false)Shell.RegWrite(ToastStatus, 0);
if(PlusWnd.Button_IsChecked("ToastMedia"))Shell.RegWrite(ToastMedia, -1);
if(PlusWnd.Button_IsChecked("ToastMedia")==false)Shell.RegWrite(ToastMedia, 0);
if(PlusWnd.Button_IsChecked("ToastSignout"))Shell.RegWrite(ToastSignout, -1);
if(PlusWnd.Button_IsChecked("ToastSignout")==false)Shell.RegWrite(ToastSignout, 0);
if(PlusWnd.Button_IsChecked("Beep"))Shell.RegWrite(Beep_Sound, -1);
if(PlusWnd.Button_IsChecked("Beep")==false)Shell.RegWrite(Beep_Sound, 0);
if(PlusWnd.Button_IsChecked("ToastOpen"))Shell.RegWrite(ToastOpen, -1);
if(PlusWnd.Button_IsChecked("ToastOpen")==false)Shell.RegWrite(ToastOpen, 0);
if(PlusWnd.Button_IsChecked("ToastClose"))Shell.RegWrite(ToastClose, -1);
if(PlusWnd.Button_IsChecked("ToastClose")==false)Shell.RegWrite(ToastClose, 0);
if(PlusWnd.Button_IsChecked("ToastRien"))Shell.RegWrite(ToastNull, -1);
if(PlusWnd.Button_IsChecked("ToastRien")==false)Shell.RegWrite(ToastNull, 0);
PlusWnd.Close(1)}
if(ControlId == "clone"){
OpenWndClone()}}
function OnOptClonageEvent_CtrlClicked(PlusWnd, ControlId){
var Shell = new ActiveXObject("WScript.Shell");
if(ControlId == "BtnRetr"){
if(PlusWnd.Button_IsChecked("RIENTT"))Shell.RegWrite(CloneActive, -1);
if(PlusWnd.Button_IsChecked("RIENTT")==false)Shell.RegWrite(CloneActive, 0);
if(PlusWnd.Button_IsChecked("ToastAlertClone"))Shell.RegWrite(CloneActiveToast, -1);
if(PlusWnd.Button_IsChecked("ToastAlertClone")==false)Shell.RegWrite(CloneActiveToast, 0);
if(PlusWnd.Button_IsChecked("ToastAlertExcl"))Shell.RegWrite(CloneActiveMsg, -1);
if(PlusWnd.Button_IsChecked("ToastAlertExcl")==false)Shell.RegWrite(CloneActiveMsg, 0);
if(PlusWnd.Button_IsChecked("Email"))Shell.RegWrite(CloneEmail, -1);
if(PlusWnd.Button_IsChecked("Email")==false)Shell.RegWrite(CloneEmail, 0);
if(PlusWnd.Button_IsChecked("openclone"))Shell.RegWrite(CloneOpenChat, -1);
if(PlusWnd.Button_IsChecked("openclone")==false)Shell.RegWrite(CloneOpenChat, 0);
if(PlusWnd.Button_IsChecked("rienfaire"))Shell.RegWrite(CloneNull, -1);
if(PlusWnd.Button_IsChecked("rienfaire")==false)Shell.RegWrite(CloneNull, 0);
PlusWnd.Close(1)}}
function OnGetScriptMenu(Location){
if(Location == 2){}
var ScriptMenu = "<ScriptMenu>";
ScriptMenu += "<MenuEntry Id=\"Opt\">Options de Track</MenuEntry>";
ScriptMenu += "<MenuEntry Id=\"Upd\">Mises a jours</MenuEntry>";
ScriptMenu += "<Separator/>"
ScriptMenu += "<MenuEntry Id=\"About\">A propos...</MenuEntry>";
ScriptMenu += "</ScriptMenu>";
return ScriptMenu;}
function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd){
if(MenuItemId == "Opt"){
OpenWnd()}}
Window :
XML code:
<Interfaces xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<GlobalColors>
<GlobalColor Id="color1">
<Red>10</Red>
<Green>50</Green>
<Blue>70</Blue>
<Alpha>220</Alpha>
</GlobalColor>
<GlobalColor Id="color2">
<Red>10</Red>
<Green>50</Green>
<Blue>70</Blue>
<Alpha>255</Alpha>
</GlobalColor>
<GlobalColor Id="color3">
<Red>20</Red>
<Green>1</Green>
<Blue>50</Blue>
<Alpha>255</Alpha>
</GlobalColor>
</GlobalColors>
<Window Id='Interface' Version='1'>
<Attributes>
<Caption>Track - Options</Caption>
</Attributes>
<TitleBar>
<AllowClose>true</AllowClose>
<AllowMaximize>false</AllowMaximize>
<AllowMinimize>true</AllowMinimize>
<Title><Text>Options de Track</Text></Title>
</TitleBar>
<Position Width='300' Height='240'/>
<DialogTmpl>
<BottomBar Style="Plain">
<LeftControls>
<Control xsi:type="MenuButtonControl" Id="BtnOptions">
<Position Top="0" Width="67" Left="0"/>
<Attributes>
<AlwaysDisplayBorder>true</AlwaysDisplayBorder>
</Attributes>
<Menu Id="MnuOptions" VPos="Bottom" HPos="CenterLeft">
<MenuEntry Id="beep">Changer le son lors d'une alerte</MenuEntry>
<MenuEntry Id="clone">Modifier l'alert lors d'un clonage</MenuEntry>
<MenuEntry Id="updates">Vérifier les mises a jours</MenuEntry>
<Separator/>
<MenuEntry Id="plus">A propos</MenuEntry>
</Menu>
<Caption>Autres Options</Caption>
</Control>
</LeftControls>
<RightControls>
<Control xsi:type="ButtonControl" Id="Sauv">
<Position Top="0" Width="67" Left="0"/>
<Attributes>
<IsDefault>true</IsDefault>
</Attributes>
<Image Margin="4">
<Name>icon-floppy</Name>
</Image>
<Caption>Sauvegarder</Caption>
</Control>
<Control xsi:type="ButtonControl" Id="BtnCancel">
<Position Top="0" Width="60" Left="0"/>
<Caption>Fermer</Caption>
</Control>
</RightControls>
</BottomBar>
</DialogTmpl>
<Controls>
<Control xsi:type="StaticControl" Id="Titre">
<Position Top="5" Width="150" Left="67" Height="20"/>
<Color><GlobalColor>color1</GlobalColor></Color>
<Font><Size>15</Size><Bold>true</Bold></Font>
<Caption>Préférences de Track</Caption>
</Control>
<Control xsi:type="StaticControl" Id="par1">
<Position Top="30" Width="150" Left="20" Height="20"/>
<Color><GlobalColor>color2</GlobalColor></Color>
<Font><Size>8</Size><Bold>true</Bold></Font>
<Caption>Options des alertes :</Caption>
</Control>
<Control xsi:type="CheckBoxControl" Id="ToastMsg">
<Position Top="50" Width="113" Left="22"/>
<Help>Si vous cochez, vous serez alerter quand vous recevrez un message</Help>
<Caption>Alerter pour les messages reçus</Caption>
</Control>
<Control xsi:type="CheckBoxControl" Id="ToastName">
<Position Top="61" Width="141" Left="22"/>
<Help>Si vous cochez, vous serez alerter quand un contact changera de pseudo</Help>
<Caption>Alerter pour les changements de pseudo</Caption>
</Control>
<Control xsi:type="CheckBoxControl" Id="ToastPsm">
<Position Top="72" Width="180" Left="22"/>
<Help>Si vous cochez, vous serez alerter quand un contact changera de status</Help>
<Caption>Alerter pour les changements de message personnel</Caption>
</Control>
<Control xsi:type="CheckBoxControl" Id="ToastStatus">
<Position Top="83" Width="137" Left="22"/>
<Help>Si vous cochez, vous serez alerter quand un contact changera de message personnel</Help>
<Caption>Alerter pour les changements de status</Caption>
</Control>
<Control xsi:type="CheckBoxControl" Id="ToastSignout">
<Position Top="94" Width="141" Left="22"/>
<Help>Si vous cochez, vous serez alerter quand un contact se déconnecte</Help>
<Caption>Alerter pour les déconnection de contact</Caption>
</Control>
<Control xsi:type="CheckBoxControl" Id="ToastMedia">
<Position Top="105" Width="136" Left="22"/>
<Help>Si vous cochez, vous serez alerter quand un contact changera de média</Help>
<Caption>Alerter pour les changements de média</Caption>
</Control>
<Control xsi:type="CheckBoxControl" Id="Beep">
<Position Top="116" Width="163" Left="22"/>
<Help>Si vous cochez, vous serez alerter par un son modifiable</Help>
<Caption>Jouer un son lorsque vous recevez un message</Caption>
</Control>
<Control xsi:type="StaticControl" Id="par2">
<Position Top="130" Width="150" Left="20" Height="20"/>
<Color><GlobalColor>color2</GlobalColor></Color>
<Font><Size>8</Size><Bold>true</Bold></Font>
<Caption>Lorsque vous cliquez sur la popup :</Caption>
</Control>
<Control xsi:type="RadioControl" Id="ToastOpen">
<Position Top="143" Width="117" Left="22"/>
<Caption>Ouvrir une nouvelle conversation</Caption>
</Control>
<Control xsi:type="RadioControl" Id="ToastClose">
<Position Top="154" Width="64" Left="22"/>
<Caption>Fermer la popup</Caption>
</Control>
<Control xsi:type="RadioControl" Id="ToastRien">
<Position Top="165" Width="51" Left="22"/>
<Caption>Ne rien faire</Caption>
</Control>
</Controls>
</Window>
<Window Id='OptClonage' Version='1'>
<Attributes>
<Caption>Track - Options de clonage</Caption>
</Attributes>
<TitleBar>
<AllowClose>true</AllowClose>
<AllowMaximize>false</AllowMaximize>
<AllowMinimize>true</AllowMinimize>
<Title><Text>Options de Track</Text></Title>
</TitleBar>
<Position Width='255' Height='195'/>
<DialogTmpl>
<BottomBar Style="None">
<RightControls>
<Control xsi:type="ButtonControl" Id="BtnRetr">
<Position Top="0" Width="80" Left="0"/>
<Caption>Retour</Caption>
</Control>
</RightControls>
</BottomBar>
</DialogTmpl>
<Elements>
<Element xsi:type="ImageElement" Id="ImgTitle">
<Position Top="50" Left="-40"/>
<Image><Name>MsgClone</Name></Image>
</Element>
</Elements>
<Controls>
<Control xsi:type="StaticControl" Id="Titre2">
<Position Top="0" Width="250" Left="5" Height="20"/>
<Color><GlobalColor>color3</GlobalColor></Color>
<Font><Size>12</Size><Bold>true</Bold></Font>
<Caption>Options de clonages...</Caption>
</Control>
<Control xsi:type="StaticControl" Id="Titre3">
<Position Top="12" Width="250" Left="5" Height="50"/>
<Color><GlobalColor>color2</GlobalColor></Color>
<Font><Size>8</Size><Bold>false</Bold></Font>
<Caption>Les options de clonages vous protègent contres les type\nde script tel que Huhu_Clone</Caption>
</Control>
<Control xsi:type="StaticControl" Id="Titre4">
<Position Top="28" Width="250" Left="115" Height="50"/>
<Color><GlobalColor>color2</GlobalColor></Color>
<Font><Size>8</Size><Bold>true</Bold></Font>
<Caption>Options des alertes :</Caption>
</Control>
<Control xsi:type="RadioControl" Id="RIENTT">
<Position Top="43" Width="85" Left="117"/>
<Caption>Ne rien faire</Caption>
</Control>
<Control xsi:type="RadioControl" Id="ToastAlertClone">
<Position Top="54" Width="85" Left="117"/>
<Caption>M'alerter avec un toast</Caption>
</Control>
<Control xsi:type="RadioControl" Id="ToastAlertExcl">
<Position Top="65" Width="150" Left="117"/>
<Caption>M'alerter avec un message windows</Caption>
</Control>
<Control xsi:type="ComboBoxControl" Id="TypeMsg">
<Position Top="76" Width="100" Left="130"/>
<Help>Définit le type de message lors d'une alert</Help>
</Control>
<Control xsi:type="StaticControl" Id="Titre5">
<Position Top="95" Width="250" Left="115" Height="50"/>
<Color><GlobalColor>color2</GlobalColor></Color>
<Font><Size>8</Size><Bold>true</Bold></Font>
<Caption>Lors d'un clonage :</Caption>
</Control>
<Control xsi:type="RadioControl" Id="Email">
<Position Top="106" Width="130" Left="117"/>
<Attributes>
<IsNewGroup>true</IsNewGroup>
</Attributes>
<Caption>Changer mon pseudo par mon E-Mail</Caption>
</Control>
<Control xsi:type="RadioControl" Id="openclone">
<Position Top="117" Width="130" Left="117"/>
<Attributes>
<IsNewGroup>false</IsNewGroup>
</Attributes>
<Caption>Ouvrir une conversation</Caption>
</Control>
<Control xsi:type="RadioControl" Id="rienfaire">
<Position Top="128" Width="130" Left="117"/>
<Attributes>
<IsNewGroup>false</IsNewGroup>
</Attributes>
<Caption>Ne rien faire</Caption>
</Control>
</Controls>
</Window>
</Interfaces>
its will be shitting for you all to look at but when I carry out changes in the window "OptConage", this are not safeguard.
I do not know if you very included/understood then I will make simple:
To repair my script
thank you in advance