Shoutbox

OnGetScriptMenu doesn't work - 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: Scripting (/forumdisplay.php?fid=39)
+----- Thread: OnGetScriptMenu doesn't work (/showthread.php?tid=98805)

OnGetScriptMenu doesn't work by Guffy on 01-13-2012 at 01:37 AM

Hi all
I made simple script

code:
function OnEvent_Initialize(MessengerStart)
{
    Debug.Trace("Trace OnEvent_Initialize");
}

function OnEvent_Uninitialize(MessengerExit)
{
    Debug.Trace("Trace OnEvent_Uninitialize");
}

function OnGetScriptMenu(Location) {
    Debug.Trace("Trace OnGetScriptMenu");
    var ScriptMenu ="<ScriptMenu>";
    ScriptMenu +="<MenuEntry Id=\"testMenu\">Test Manu Item</MenuEntry>";
    ScriptMenu +="</ScriptMenu>";
    return ScriptMenu;
}

function OnEvent_MenuClicked(MenuId, Location, Wnd) {
    Debug.Trace("Trace OnEvent_MenuClicked");
}

and seems Plus doesn't call OnGetScriptMenu :(

I tried with 2 machines - my Win 7 with Live Messenger 15 and and fresh install of Live messenger 14 on XP.
both with Plus 5.10.0.750

I doesn't seen any new menu items...

RE: OnGetScriptMenu doesn't work by Spunky on 01-13-2012 at 08:25 AM

Does the script trace anything when the event is supposed to trigger? If not, there's probably an error I've not noticed. If it does and the menu doesn't show, it could be a bug


RE: OnGetScriptMenu doesn't work by matty on 01-13-2012 at 01:39 PM

I agree with Spunky. Enable Script Debugging (In the Developer Tools section of the scripts window in the preferences) this will show you any errors relating to the script. Post them here and we can help further. As it stands you have no errors in your code from what I can see.


RE: OnGetScriptMenu doesn't work by Guffy on 01-13-2012 at 06:16 PM

thanks guys for reply
yes, seems script itself is ok
when I save the script - editor show messagebox with Saved sucessfully
and trace log is

code:
Function called: OnEvent_Uninitialize
Trace OnEvent_Uninitialize
Script has been stopped
Script is starting
Script is now loaded and ready
Function called: OnEvent_Initialize
Trace OnEvent_Initialize




apropos, seems feature of Plus Event Notification doesn't work too. for the event Started a new chat. I added it for all contaccts and and tray popup doesn't shown when friend begun chat with me. we both tried this feature and hasn't success.

RE: OnGetScriptMenu doesn't work by Mnjul on 01-13-2012 at 06:55 PM

Would you mind attaching the whole script file?


RE: OnGetScriptMenu doesn't work by Spunky on 01-13-2012 at 07:25 PM

If possible, do as Mnjul asks, but at the same time, do you have any other add-ons installed for Messenger? I seem to remember seeing this problem before


RE: OnGetScriptMenu doesn't work by Guffy on 01-13-2012 at 07:26 PM

It's whole script file.
No, I have only Messenger Plus.
and I tried on clean XP virtual machine too. I installed live messenger and then plus 5.10


RE: OnGetScriptMenu doesn't work by Spunky on 01-13-2012 at 07:32 PM

The fragment of code works here fine.

It doesn't matter if it's a whole file, but it may be something else that's preventing it from showing.

If you aren't comfortable posting the code in public, you can send me a private message with the code between code tags and I'll take a look


RE: OnGetScriptMenu doesn't work by Guffy on 01-13-2012 at 07:34 PM

Sorry, guys. I it's my epic fail...
I expected that new menu items added to common Plus menu.
I never used plugins of Plus before and dosn't know the fact that plugins add menu items to separate toolbar icon.
the years of programming doesn't garanty from stupid faults ;)


RE: OnGetScriptMenu doesn't work by Guffy on 01-13-2012 at 07:35 PM

Thanks for help anyway!


RE: OnGetScriptMenu doesn't work by CookieRevised on 01-16-2012 at 12:37 AM

hehe, no worries...
Now you have something else you'll never forget :P

Anyways, off topic but

quote:
Originally posted by Guffy
apropos, seems feature of Plus Event Notification doesn't work too. for the event Started a new chat. I added it for all contaccts and and tray popup doesn't shown when friend begun chat with me. we both tried this feature and hasn't success.
Note that the "started a new chat" notification will only show up when there is already a conversation window open with that contact. It wont give you a notification when someone starts to write something to you (without an existing conversation being open). And IIRC it will only show when the conversation window is not the top focused window.

So, it is more like a "contact has continued your current conversation while the connection/session was closed but your conversation window was still open" if you will.

;)

[/OFF TOPIC]