What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Help] OnGetScriptMenu not executing

[Help] OnGetScriptMenu not executing
Author: Message:
Amec
Junior Member
**


Posts: 19
32 / Male / Flag
Joined: Sep 2008
O.P. [Help] OnGetScriptMenu not executing
Ok, well. In this project, I have 3 source files:

1. Menu.js - object I created for easily editing the menu
2. Window.js - object I created for keeping track of PlusWnds
3. Main.js - creates objects and stuff

In Main.js, when I create a global variable like so:
code:
var windows;
the OnGetScriptMenu function isn't called when I click on the menu. Commenting this line out, or changing the name, fixes the problem. The variable is not referenced anywhere.

Now, I had this same problem a few days ago, in a different script, with a different variable name, which was "scriptMenuCache", which works fine in this script. (global both times) Wtf is going on? :S
02-08-2009 03:52 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Help] OnGetScriptMenu not executing
Best to post the plsc so we can take a look.
02-08-2009 04:25 PM
Profile E-Mail PM Find Quote Report
Amec
Junior Member
**


Posts: 19
32 / Male / Flag
Joined: Sep 2008
O.P. RE: [Help] OnGetScriptMenu not executing
Here ya go :P

This post was edited on 02-08-2009 at 04:51 PM by Amec.
02-08-2009 04:34 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Help] OnGetScriptMenu not executing
The problem is that your variable has the same name as the Windows function.

Either name the variable oWindows or name the function xWindows or something to differentiate between the two.
02-08-2009 04:46 PM
Profile E-Mail PM Find Quote Report
Amec
Junior Member
**


Posts: 19
32 / Male / Flag
Joined: Sep 2008
O.P. RE: [Help] OnGetScriptMenu not executing
Isn't JScript case sensitive...?
02-08-2009 04:51 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Help] OnGetScriptMenu not executing
Well let me put it this way. The moment I changed the variable name it worked when I changed it back it didn't. Then I changed the function name and it worked.
02-08-2009 04:54 PM
Profile E-Mail PM Find Quote Report
Amec
Junior Member
**


Posts: 19
32 / Male / Flag
Joined: Sep 2008
O.P. RE: [Help] OnGetScriptMenu not executing
Ok, well what was happening in my other script then? There was no function called "scriptMenuCache".
02-08-2009 04:59 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Help] OnGetScriptMenu not executing
quote:
Originally posted by Amec
Ok, well what was happening in my other script then? There was no function called "scriptMenuCache".
The problem with Plus! is the way the files are loaded if will load the file that is the same name as the script so if you globally declare a variable that references another function that hasn't been loaded yet you wont get an error but the script wont work.
02-08-2009 05:09 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On