Wow I guess I should look at my coding before posting it...
Ok first things first in __commands.js we need to edit a line
js code:
(typeof sParameter === 'undefined' ? '' : '<Parameters><'+LoadString('CommandDelay')+'></Parameters>')+
Change to:
js code:
>>>(typeof sParameter === 'undefined' ? '' : '<Parameters><'+sParameter+'></Parameters>')+<<<
Glad I found this because the code is used in Screenshot Sender as well! Oopsies!
And these functions needs to be changed:
js code:
function OnGetScriptCommands(){
var oCommand = new Commands();
with (oCommand) {
AddCommand('mycommand1', 'My command without parameter');
>>> AddCommand('mycommand1', 'My command with parameter', 'Enter a parameter');<<<
}
return oCommand.ExportCommands();
}
function OnEvent_ChatWndSendMessage(oChatWnd, sMessage) {
>>> if (/^\/([^\s\/]+)\s*([\s\S]*)$/.exec(sMessage) !== null) {<<<
var _command = RegExp.$1.toLowerCase();
var _param = RegExp.$2;
switch (_command) {
case 'mycommand':
if ( _param !== '' ) {
/*
Do stuff here
*/
} else {
/*
Do stuff here
*/
}
break;
}
}
}