looks good for your first script... Though you have some things you might want to correct:
code:
case 'MnuTest' :
wnd.SendMessage('{ test goes here }');return;
return;
You have 1 "return;" too many here... delete the one after the sendmessage line.
code:
case 'MnuInfo' :
(...)
What is shown here can also be shown with the (!VER) tag. Same with the part which handles the "#info" command.
code:
case 'MnuBath' :
(...)
if (IAm == "bath") {
var ValRegPathIAm = MsgPlus.ScriptRegPath + "IAm";
(...)
}
else
{
(...)
var ValRegPathIAm = MsgPlus.ScriptRegPath + "IAm";
(...)
}
You already have "var ValRegPathIAm" defined before the if then else statement, no need to do it again in the "if" and again in the "else". Those lines can be deleted.
The same goes for "case 'MnuBath'" , "case 'MnuSleeping'", "case 'MnuEating'". And same goes for the parts of the equivalent commands.
--
And in general: you can make that script really extremely shorter.
(ps: and with this I don't mean the things I've said above. This is an additional thing you can do to the stuff listed above)
--
EDIT:
quote:
Originally posted by JonnyT
(...) and hoefully add custom commands for the #inbath, #sleep etc
before you do that, find the ways to make your script shorter. It would be far more easier to add stuff to the shorter version than to the existing version.