Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 05-21-2007, 12:39 AM   #1 (permalink)
Junkie
 
zero2's Avatar
 
WScript Help?

Does anyone know if its possible to store an array into a text file.

Basically the array contains a count of # times script has been visited, name of user, major, age.

So far I got a good idea how to create the array, but I'm not sure if I can store it into a file, or if it's possible.

ex. of what file text file should have:

1, john doe, psychology, 41
2, bob catz, accounting, 23

Code:
' Save file as script.vbs
' Define array store count, name, major, age
Dim array[3] 

'array(0) count goes here
array(1) = InputBox("Enter your name:") 'Get the users name
array(2) = InputBox("Enter your major:") 'Get the users major
array(3) = InputBox("Enter your age:") 'Get the users age
zero2 is offline  
Old 05-21-2007, 07:26 AM   #2 (permalink)
Devils Cabana Boy
 
Dilbert1234567's Avatar
 
Location: Central Coast CA
use a special character to separate each cell, in your example, the comma.

when you are saving your text, just stick the comma in between, then returns after each array. you could then use regular expressions to rebuild the arrays.

it would be better to use something other then a comma to break up the test though. maybe like a pipe or a tilda, things that are not used much.

this is not the most efficient way, but it is the easiest to understand.
__________________
Donate Blood!

"Love is not finding the perfect person, but learning to see an imperfect person perfectly." -Sam Keen
Dilbert1234567 is offline  
 

Tags
wscript


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 06:16 AM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73