|
Purpose | With ReadFile you can read a record from a file into GuiXT variables. You can then use the values in an InputScript. | ||
Example | ReadFile “X:GuiXTFiles\MatDes.txt” s_matnr s_text s_unit s_price
A new record is read from the file. Using the delimiter given in the OpenFile command (Delimiter=, default delimiter is the tab), the record fields are separated from each other and the variables are filled with the field values. For example, if you read the record 1000001;20;Screw;ST;0.02 then the variable values are &[s_matnr]= 10000120 &[s_text]= Screw &[s_unit]= ST &[s_price]= 0.02 | ||
Additional options |
| ||
Format | ReadFile “filename” var1 var2 var3 …
Up to 60 variables are possible (before GuiXT version 2009 Q1 2: 20 variables). If there are no more records in the file (end of file), then all variables are cleared. | ||
Tips & Tricks |
|