quote:
Originally posted by PedroGabriel
why i Can't use here
js code:
function Write(){
//Shell.RegWrite(varPath, ''+Origin+'asdsd');
}
Origin is not defined in the scope of Write. You could make the value to write a parameter of the Write function so that you can pass in the value where you call the function.
js code:
function Write( Value ){ // Value is received as first parameter
Shell.RegWrite( varPath, Value ); // We can use it here
}
function OnEvent_ChatWndReceiveMessage( ChatWnd, Origin, rMessage, MsgKind ){
if ( rMessage == 'aaa' ){
Write( Origin+'asdsd' ); // Passing a string as first parameter
}
}
I suggest you first learn some more about the JScript language before diving in Plus! scripting, have a look at
this tutorial on MSDN.