What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Call MsgPlus functions from a script

Call MsgPlus functions from a script
Author: Message:
mynetx
Skinning Contest Winner
*****

Avatar
Microsoft insider

Posts: 1175
Reputation: 33
37 / Male / Flag
Joined: Jul 2007
O.P. Call MsgPlus functions from a script
A script uses a BrowserControl. It is thus only compatible with MPL >=4.50. How can I open the original MsgPlus Update dialog when MsgPlus.VersionBuild < 312? I'm also thinking of cases where the user set the auto-update check off in MPL prefs...

Short question: How to trigger MPL self-update from a script?

Second question: How to access other functions, like opening Plus prefs, CL clean-up window, or Plus about pane?
Regards,

This post was edited on 01-05-2008 at 05:26 PM by mynetx.
mynetx - Microsoft, enhanced.

You have a problem or issue with Windows, Internet
Explorer or Office?
Send a tweet!
01-05-2008 05:25 PM
Profile E-Mail PM Web Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1622
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: Call MsgPlus functions from a script
You could just make a window explaining that some features won't work until they upgrade plus to the latest version if their version number is not what you need....
[Image: markee.png]
01-06-2008 12:26 AM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Call MsgPlus functions from a script
quote:
Originally posted by markee
You could just make a window explaining that some features won't work until they upgrade plus to the latest version if their version number is not what you need....
Which is indeed what every script in such a situation should do....

----

mynetx, you can only invoke functions which are listed in the Plus! menus. This is done by sending the cmdid (command id) of the wanted menu item to the main Messenger window using the PostMessageW Windows API. eg:
code:
To toggle the event viewer on/off:
    Interop.Call('User32', 'PostMessageW', Messenger.ContactListWndHandle, /* WM_COMMAND */ 0x0111, /* wParam (cmdid) */ 7401, /* lParam */ 0x0000);

// Other Plus! menu cmdids:
// 7400: About Window
// 7401: Event Viewer
// 7405: Contact List Clean-up
// 7406: Preferences
// 7407: Messenger Lock
// 7409: Contacts on Desktop
// 7410: Script Debugger
// 7412: Set Personalised Status
// 7422: Chat Log Viewer
// 7437: Sound Library
// 7452: Config Wizard
// 7454: Get New Scripts (open http://www.msgpluslive.net/scripts/browse)
// 7455: Preferences (scripts)
// 7457: Get New Skins (open http://www.msgpluslive.net/skins/)
// 7458: Preferences (skins)
// 7460: Current Skin Options
// 7461: Current Skin Website
// 7462: Toggle 'Send Personalised Status Auto-Messages'
// 7700: Invoke first personalised status
// 7701: Invoke second personalised status
// 7702: Invoke third personalised status, etc...
// 7850: Open Email Client

// Note that these cmdids might change in future versions!
* similar cmdids exist for items in the Plus! menus in a chatwindow.
* The above short example code requires that the contactlist window exists! To not depend on that, see the link below.


But don't simply trigger the Plus!-update check. This is actually not very user friendly (the user doesn't know that your script didn't work, so he/she also can simply discard the auto-update thinking he/she doesn't need it, etc).

Unless you first show the user a dialog explaining that your script needs the latest Plus! version, like markee already said.

EDIT: see also here for some important remarks and more details...

This post was edited on 05-09-2008 at 12:01 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
01-06-2008 01:15 AM
Profile 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