What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Combobox/editbox variables

Combobox/editbox variables
Author: Message:
MeEtc
Patchou's look-alike
*****

Avatar
In the Shadow Gallery once again

Posts: 2200
Reputation: 60
38 / Male / Flag
Joined: Nov 2004
Status: Away
RE: Combobox/editbox variables
Sure, that's definitly possible about changing the values. I'll write out some code after I get home in a bit.
I don't have any experience with using XML to store the data, but that shouldn't be too hard to do. I would recommend reading the data from the XML when the window opens and store it in an array relating to the email address of the contact. Store all the changes in memory until the window is destroyed to save disk operations.

Hopefully you have enumerated the ComboBox with an ItemData, otherwise you will have no way to link each value
JScript code:
/*some global vars */
var currentContact = 0;
var aContacts = Array[];
var aContactData = Array[];
 
 
function On[i]WindowId[/i]Event_ComboSelChanged (Wnd, ControlId) {
   newContact = Wnd.Combo_GetItemData(ControlId, Wnd.Combo_GetCurSel(ControlId));
   aContactData[curentContact] = Wnd.GetControlText([i]EditBoxControl[/i])
   Wnd.SetControlText([i]EditBoxControl[/i], aContactData[newContact]);
   currentContact = newContact;
}

when the window with the controls are created, the 2 arrays aContacts and aContactData should be populated with this: the key value of the arrays should just be integers, the exact valuses aren't really important. The values to fill in on aContacts should be the email addresses, and aContactData the values of the EditBox. once the window is destroyed (OK button or whatever) write out the values the user recorded back to the XML file using a for loop
JScript code:
for (var i =1; i<aContacts.Size; i++)
   // use aContacts[i] and aContactData[i] to write out the array data
   // make sure to remove the data from the array when the window is destroyed from any method: OK, Cancel, X in corner or otherwise


WDZ, fix GeSHi to allow BBCode :sad:

This post was edited on 01-10-2009 at 04:14 AM by MeEtc.
[Image: signature/]     [Image: sharing.png]
I cannot hear you. There is a banana in my ear.
01-10-2009 02:15 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Combobox/editbox variables - by ArkaneArkade on 01-09-2009 at 09:19 PM
RE: Combobox/editbox variables - by MeEtc on 01-10-2009 at 02:15 AM
RE: Combobox/editbox variables - by ArkaneArkade on 01-10-2009 at 07:46 AM


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