Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Array

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,48390
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Array
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Array - 6/16/2007 3:06:38 PM   
  ehsan

 

Posts: 13
Score: 0
Joined: 5/5/2007
Status: offline
Set FSO = CreateObject("Scripting.FileSystemObject")
if FSO.FileExists(partion & "\All Folder in All Drive.txt") Then 
Dim arrTxtFile : arrTxtFile = ReadTxtToArray(partion & "\All Folder in All Drive.txt")
Function ReadTxtToArray(strInputFilePath)                                       'F1
     Const ForReading = 1
     Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
     Dim objFile : Set objFile = objFSO.OpenTextFile(strInputFilePath, ForReading)
     ReadTxtToArray = Split(objFile.ReadAll, VbCrLf)
msgbox ReadTxtToArray
    objFile.Close

End Function   
End if

How Can I Show ingredient in Array?
 
 
Post #: 1
 
 RE: Array - 6/16/2007 3:38:56 PM   
  dm_4ever


Posts: 2663
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
Make sure you are defining what partion is and then try something like this if you are trying to see the values of your array.  Possible shortfalls of using Split on a .ReadAll have been discussed in other posts so you may want to search/look for those.  i.e. http://www.visualbasicscript.com/m_47020/tm.htm


      

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ehsan)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Array Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts