What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Scripting API Wishlist

Pages: (15): « First « 10 11 12 13 [ 14 ] 15 » Last »
Scripting API Wishlist
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Scripting API Wishlist
I am bumping this thread because there is going to be talks surrounding the new scripting engine and I wanted to find out from everyone what they would like to see in Plus! 5 scripting engine.
05-13-2010 02:55 PM
Profile E-Mail PM Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
RE: Scripting API Wishlist
Pretty much anything in this thread..? (Long as it's possible, of course)
05-13-2010 02:59 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Scripting API Wishlist
Yeah I figured that but are there any suggestions outside of this thread? For instance Matti and I were discussing the possibility of being able to have controls some how be an object which you can assign a dynamic function to. Just as an example.

Or being able to assign dynamic callback functions to Windows. We haven't worked it out quite yet it was just an idea discussed.

This post was edited on 05-13-2010 at 03:08 PM by matty.
05-13-2010 03:03 PM
Profile E-Mail PM Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
RE: Scripting API Wishlist
As in .NET programming? Like MyForm.BtnHello = new Button(); or something?
05-13-2010 03:08 PM
Profile PM Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: Scripting API Wishlist
how about much better dynamic window support? like not having to have it as a xml then edit the xml to change the window?
05-14-2010 07:34 AM
Profile PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: Scripting API Wishlist
quote:
Originally posted by SmokingCookie
As in .NET programming? Like MyForm.BtnHello = new Button(); or something?
Perhaps not actually creating controls, but acquiring an object with control-specific methods, properties and ideally events as well.
js code:
var MyWnd = MsgPlus.CreateWnd("Interfaces.xml", "MyWnd");
// Acquire control object for a ListViewControl
var LvFiles = MyWnd.GetControl("LvFiles");
// Methods
LvFiles.AddItem("alpha.txt");
LvFiles.AddItem("beta.txt");
// Properties
Debug.Trace("Item count: "+LvFiles.ItemCount); // = 2
// Events
LvFiles.AddEventHandler("Clicked", OnLvFilesEvent_Clicked);
LvFiles.AddEventHandler("SelStateChange", function(ItemIdx, SelectedState) {
    Debug.Trace("Item #"+ItemIdx+" selection state changed to "+SelectedState);
    Debug.Trace("Item data: " + this.GetItemData(ItemIdx) );
});
Of course, all of this is nothing more than an early proposal. Here are my thoughts:
  • I believe it would be better to pass event callbacks as function objects instead of function names to prevent global scope saturation.
  • The "this" context inside the event callback could be set to the control object. By doing so, you don't need to pass PlusWnd and ControlId as parameters to the function, you could access everything through the control object itself. If you still need the window or the control ID, the control object could have properties such as Control::Parent and Control::ControlId.
I don't say it has to be this way, it's just something which could be considered.
quote:
Originally posted by NanaFreak
how about much better dynamic window support? like not having to have it as a xml then edit the xml to change the window?
Certainly, I believe that the new scripting environment should provide sufficient window and control support to remove the need of in-runtime XML rewriting. Matty has already informed me that this is high on his wish list. CodeEditControls and MenuButtonControls urgently need an API - they simply cannot be modified through code in Plus! 4. Ideally, methods could be added to natively (without Win32 API) handle DateTimeControls, HotkeyControls, ProgressControls, ScrollBarControls, SliderControls, SpinControls and TreeViewControls.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
05-14-2010 09:30 AM
Profile E-Mail PM Web Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
RE: Scripting API Wishlist
I think this would indeed be better. But I thinkt the new engine should be backwards compatible.
05-14-2010 09:45 AM
Profile PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: Scripting API Wishlist
quote:
Originally posted by SmokingCookie
I think this would indeed be better. But I thinkt the new engine should be backwards compatible.
As long as they don't remove any methods from the existing objects and keep the current event handlers (global "OnEvent_" functions) working, I don't see how any of this could break backwards compatibility.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
05-14-2010 10:15 AM
Profile E-Mail PM Web Find Quote Report
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
RE: Scripting API Wishlist
Just had another idea: call script functions from the command line.

For example, you could make shortcuts to activate certain functions, or you could apply them to files, like in the SendTo menu, or as a context menu entry.

Maybe if it's called like this:
code:
C:\...\MPTools.exe /script <email> "<script name>" <function> <param1> <param2> ... <paramX>

You can have a SendTo option to open a file like this...
code:
C:\...\MPTools.exe /script <email> "File Reader" OpenFile "%1" sendto
So, for a file at C:\Some File.txt, that would then call the function in the script "File Reader":
js code:
OpenFile("C:\\Some File.txt", "sendto");

This post was edited on 08-31-2010 at 05:57 PM by whiz.
06-05-2010 11:53 AM
Profile E-Mail PM Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
RE: Scripting API Wishlist
Well, I guess you'd need to specify which intance of Messenger is used to run the script function; could be done by typing an email address into the command line I think.
06-05-2010 12:52 PM
Profile PM Find Quote Report
Pages: (15): « First « 10 11 12 13 [ 14 ] 15 » Last »
« 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