My script looks like it:
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
var explorer = '/explorer ';
if(Message.substring(0,8)==explorer)
{
Interop.Call("shell32.dll", "ShellExecuteW", 0, "explore", "C:\\Documents and Settings", 0, 0, 1);
return '';
}
}
function OnGetScriptCommands(){
var commands = '<ScriptCommands>';
commands+='<Command>';
commands+='<Name>BendeR</Name>';
commands+='<Description>Multi-fonctions</Description>';
commands+='</Command>';
commands+='</ScriptCommands>';
return commands;
}
function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd){
if(MenuItemId=="enabled"){
OriginWnd.SendMessage(OnEvent_ChatWndSendMessage("", "/explorer"));
}
if(MenuItemId=="about"){
WndAbout = MsgPlus.CreateWnd("WndAbout.xml", "WndAbout");
}
}
function OnGetScriptMenu(nLocation){
var ScriptMenu = "<ScriptMenu>\n";
if(nLocation===1){
ScriptMenu += "<MenuEntry Id=\"enabled\">Explorer</MenuEntry>";
ScriptMenu += "<Separator/>";
}
ScriptMenu += "<MenuEntry Id=\"about\">À propos</MenuEntry>";
ScriptMenu += "</ScriptMenu>";
return ScriptMenu;
}
But I miss something... 'cause it still not work
EDIT: there isn't a /explorer in the command window, why?