ReadTxt » 历史记录 » 修订 5
修订 4 (yangdefeng, 2022-05-31 10:07) → 修订 5/6 (yangdefeng, 2022-05-31 10:09)
h4. _*%{color:green}readTxt%*_ 读取文件内容到指定变量 标签:命令定义|readTxt *格式* |命令名 |参数1 |参数2 | |readTxt |文件路径 |结果保存变量 | *说明* * 参数1: 读取文件路径 路径需要基于..\Mir200\Envir %{color:lightGrey}举例 设定读取路径为 \testlist.txt 完整读取路径 ..\Mir200\Envir\testlist.txt% * 参数2: 指定返回变量 - - h4. *%{color:deepskyblue}特戒引擎脚本示例:%* bq. 预制数据文件 ..\Mir200\Envir\数据文件\测试数据文件.txt --文件内容如下-- 测试数据1 测试数据2 测试数据3 测试数据4 测试数据5 bq. [@main] #act [[mov]] [[基础变量#扩展变量|s$file]] mov s$file \数据文件\测试数据文件.txt *{color:green}readTxt* [[<$str()>|<$str(s$file)>]] <$str(s$file)> s0 %{color:lightGrey};--print命令在控制台输出文件内容% print s0