Shoutbox

Script menu not showing all scripts... - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: WLM Plus! Bug Reports (/forumdisplay.php?fid=7)
+----- Thread: Script menu not showing all scripts... (/showthread.php?tid=96800)

Script menu not showing all scripts... by whiz on 02-13-2011 at 05:19 PM

I've been tweaking some of my scripts to work better with Plus! 5, but I've since noticed that the menus of some scripts aren't being shown in the script menu.  The OnGetScriptMenu() is, however, being called, since the event trace is shown in the debugger, and anything else added to the function (such as a toast) is executed correctly.  Exporting the scripts to a script pack and/or reinstalling them doesn't seem to make any difference.  Script commands seem to work fine, though.  Can anyone else confirm this?


RE: Script menu not showing all scripts... by CookieRevised on 02-14-2011 at 09:53 AM

Can't confirm (yet)...
About what scripts are you talking about? Or doesn't that matter, as in: it's a bit random?


PS: probably a stupid comment since you already know this, but some scripts might not be compatible with Plus!5 (or have the "version"-bug* in them) and as such wont show a menu item in the script menu whereas they did in Plus!4...

*version-bug: assuming that there is always a number after the decimal point of MsgPlus.Version, but since Plus! 5 is version number 5.0, it's actual numerical version number is just 5, and some scripts might not handle that properly because they try to search for the (missing) decimal point.


RE: Script menu not showing all scripts... by whiz on 02-14-2011 at 03:49 PM

Well, I've just been experimenting with Idle Manager (one of my own scripts), which wasn't working at all, and I found a particularly weird problem.  The start of the code in one of the files is like this:

js code:
var Idle = false;
var IdleStat = false;
var IdleTime = 0;
var IdleWnd;

var Name, PSM;

var Cache = {};

// ...
When I start the script, the Initialize function isn't called, the script doesn't appear in the menu, commands don't work and so on.  However...  when I commented out the Name/PSM line, it works fine.  Also, changing "Name" to a different variable name also fixes the problem.  I don't know if it has something to do with another variable called "NAME" (used for my custom auto-updater), but I thought variable names were case sensitive.  :S

Edit: just noticed "Name" is highlighted blue in the snippet above (although it doesn't seem to highlight in the Plus! script editor, or in Notepad++).  Is it a reserved name for something?
RE: Script menu not showing all scripts... by CookieRevised on 02-14-2011 at 04:27 PM

Name is indeed used as a property for certain objects. But on its own it should work I think.

Messenger::MyPersonalMessage is now readonly. You can still read it but you can't set it anymore in scripts. This might change again in the future though. There are some threads about it...

Also note that problems like events not firing and other weird/unexplainded stuff can also occur because other scripts are malfunctioning though. It seems strange, but it did happen in the past and I have experienced it myself too sometimes. The only way to find out is to use the same unaltered code, but disable all other scripts and see if you get the same errors.


RE: Script menu not showing all scripts... by whiz on 02-14-2011 at 06:45 PM

Looks like I'll just have to experiment with it some more...

quote:
Originally posted by CookieRevised
Messenger::MyPersonalMessage is now readonly. You can still read it but you can't set it anymore in scripts. This might change again in the future though. There are some threads about it...
Not the case with WLM 2009 on XP, it seems.  I'm having no trouble setting the PSM via scripting...
RE: Script menu not showing all scripts... by CookieRevised on 02-14-2011 at 07:05 PM

yeah, it is only in WLM 2011 that MyPersonalMessage is readonly. It does produce an error when you try to set it in WLM 2011.