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

Random Selection
Author: Message:
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: Random Selection
code:
function RandomFile(Folder){//The Function
    FileArray = new Array();//The Array
    for(var e = new Enumerator(fso.GetFolder(Folder).Files); !e.atEnd(); e.moveNext())//The Enumerator
        FileArray.push(e.item());//Push the files into the array
    File = FileArray[Math.floor(Math.random()*FileArray.length)];//Getting a Random File
    return File;//Return the random File
}

This post was edited on 02-04-2007 at 01:48 PM by Felu.
02-04-2007 01:27 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Random Selection - by mad_willsy on 02-03-2007 at 10:22 PM
RE: Random Selection - by Ezra on 02-04-2007 at 12:04 AM
RE: Random Selection - by mad_willsy on 02-04-2007 at 11:26 AM
RE: Random Selection - by Felu on 02-04-2007 at 01:27 PM
RE: Random Selection - by hmaster on 02-04-2007 at 01:54 PM
RE: Random Selection - by Matti on 02-04-2007 at 05:04 PM
RE: Random Selection - by mad_willsy on 02-05-2007 at 07:11 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