What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » HELP - "foreach" command!

HELP - "foreach" command!
Author: Message:
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
O.P. Huh?  HELP - "foreach" command!
Is there a way of doing something for every item in an array?  I thought there was something called "foreach" that does this...  then again, I don't really know.

For example:
js code:
var Test = new Array("test1", "test2", "test3");
var TestDesc = new Array("This is Test 1.", "This is Test 2.", "This is Test 3.");

var TestWnd = MsgPlus.CreateWnd("Windows.xml", "WndTest", 0);

foreach (Test)
{
    TestWnd.LstView_AddItem("LstTest", Test);
    TestWnd.LstView_SetItemText("LstTest", 0, 1, TestDesc)
}

This post was edited on 05-22-2009 at 04:18 PM by whiz.
05-21-2009 06:36 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
HELP - "foreach" command! - by whiz on 05-21-2009 at 06:36 PM
RE: HELP - "foreach" command! - by SmokingCookie on 05-21-2009 at 07:35 PM
RE: HELP - "foreach" command! - by Spunky on 05-21-2009 at 07:38 PM
RE: RE: HELP - "foreach" command! - by andrewdodd13 on 05-21-2009 at 08:01 PM
RE: HELP - "foreach" command! - by SmokingCookie on 05-21-2009 at 07:41 PM
RE: HELP - "foreach" command! - by whiz on 05-21-2009 at 08:01 PM
RE: HELP - "foreach" command! - by whiz on 05-21-2009 at 08:17 PM
RE: HELP - "foreach" command! - by SmokingCookie on 05-22-2009 at 07:11 AM
RE: HELP - "foreach" command! - by whiz on 05-22-2009 at 12:49 PM
RE: HELP - "foreach" command! - by SmokingCookie on 05-22-2009 at 12:54 PM
RE: HELP - "foreach" command! - by whiz on 05-22-2009 at 04:17 PM
RE: HELP - "foreach" command! - by SmokingCookie on 05-22-2009 at 04:20 PM
RE: HELP - "foreach" command! - by whiz on 05-22-2009 at 05:07 PM
RE: HELP - "foreach" command! - by matty on 05-22-2009 at 05:12 PM
RE: HELP - "foreach" command! - by felipEx on 05-22-2009 at 05:15 PM
RE: HELP - "foreach" command! - by whiz on 05-22-2009 at 07:06 PM


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