I am trying to use VBScript to manipulate data to and from .TXT files
I can successfully save information to a .TXT file, in a '$TagName; TagValue' kind of format.
I seem to be able to read that information back into variables, but I am struggling to use this information.
-----
Dim fso, File, FileValue, tagName, tagValue, strLine, arrItems, objFile, objTag
FileValue = $Seq_Name
$Z = 1
Set fso = CreateObject("Scripting.FileSystemObject")
$Z = 2
File = (FileValue & ".txt")
$Z = 3
If fso.FileExists(File) Then
$Z = 4
$Y = File
$Z = 5
objFile = fso.OpenTextFile(File,1)
$Z = 6
Do
$Z = 7
strLine = objFile.ReadLine
arrItems = Split(strLine, ";", -1, 1)
tagName = CStr(arrItems(0))
tagValue = CStr(arrItems(1))
$Z = 8
Set objTag = TagName
$Z = 9
objTag.Value = tagValue
$Z = 10
objTag.Write
$Z = 11
Loop Until objFile.AtEndOfStream
$Z = 12
End If
objFile.Close
-----
$Z and $Y are my trace tags. The script gets to '$Z = 8' then stops. This is where i need to identify the contents of TagName as a tag, and then copy information into it.
Any pointers would be appreciated.