This VBScript subroutine reads data from a text file containing tag names and values separated by semicolons, and writes the values to those tags in the runtime. It gets the filename from a tag, checks that the file exists, then opens it and reads each line, splitting it into the tag name and value. It outputs the name and value to the trace, sets the tag object, and writes the value. It loops until the end of the file, then closes the file.
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
98 views
VBS ReadFile
This VBScript subroutine reads data from a text file containing tag names and values separated by semicolons, and writes the values to those tags in the runtime. It gets the filename from a tag, checks that the file exists, then opens it and reads each line, splitting it into the tag name and value. It outputs the name and value to the trace, sets the tag object, and writes the value. It loops until the end of the file, then closes the file.