Warning

 

Close
Confirm Action

Are you sure you wish to do this?

Cancel Confirm
AR15.COM
3/15/2010 8:17:50 PM EDT
how do i get a function to return a collection (that i got from the filesystem object)
3/16/2010 9:00:47 AM EDT
[#1]
Pardon the rust. I haven't worked in vbscript since 2002.


function GetTestStrings()
 dim arrayOfStrings(1)
 arrayOfStrings(0) = "Jib"
 arrayOfStrings(1) = "Jab"
 GetTestStrings = arrayOfStrings
end function

dim arrayOfStuff

arrayOfStuff = GetTestStrings()

for each testString in arrayOfStuff
 wscript.echo(testString)
next
3/16/2010 9:32:24 AM EDT
[#2]
what do you use instead, powershell?

3/16/2010 10:06:19 AM EDT
[#3]
Been rocking C# managed code since then with a slight detour in PHP, Perl, and ColdFusion. Back then, I wasn't writing vbscript for server operations but for ASP.old. Scripting language is a scripting language. Nowadays, we use CruiseControl, NANT, and MSBuild to do the stuff that scripts used to do back in the day. I try to stay away from the windows scripting host as much as possible. Nothing aggravates me worst than seeing Error: line 489124214, char 235835, something is wrong.