项目

一般

简介

CheckAccountList » 历史记录 » 修订 3

修订 2 (machenhe, 2022-04-28 15:39) → 修订 3/4 (yangdefeng, 2022-06-22 11:18)

_*%{color:green}checkAccountList%*_ 
 检测账号是否在指定文件中 


 标签:命令定义|checkAccountList 

 *格式* 
 |命令名 		 |参数1 		 | 
 |checkAccountList|文件路径 	 | 

 *说明* 
 * 参数1: 检测文件路径 
 路径需要基于..\Mir200\Envir 路径需要基于..\\Mir200\\Envir 
 %{color:lightGrey}举例 
 设定检测路径为 
 \testlist.txt \\testlist.txt 
 完整检测路径 
 ..\Mir200\Envir\testlist.txt% ..\\Mir200\\Envir\\testlist.txt% 

 - 
 - 

 *%{color:deepskyblue}特戒引擎脚本示例:%* 

 bq. [<notextile>@</notextile>main] 
 #act 
 mov s$file \数据文件\测试非预制数据文件.txt \\数据文件\\测试非预制数据文件.txt 
 #say 
 <增加账号/<notextile>@</notextile>添加>\ \ <增加账号/<notextile>@</notextile>添加>\\ \\ 
 <删除文件中账号/<notextile>@</notextile>删除>\ \ <删除文件中账号/<notextile>@</notextile>删除>\\ \\ 
 <检测账号是否在文件中/<notextile>@</notextile>检测账号>\ \ <检测账号是否在文件中/<notextile>@</notextile>检测账号>\\ \\ 
 <检测文件存在/<notextile>@</notextile>存在>\ \ <检测文件存在/<notextile>@</notextile>存在>\\ \\ 
 &nbsp; 
 [<notextile>@</notextile>添加] 
 #act 
 [[addAccountList]] <$str(s$file)> 
 [[readTxt]] <$str(s$file)> s0 
 %{color:lightGrey};print命令在控制台输出文件内容% 
 print 文件内容-> s0 
 &nbsp; 
 [<notextile>@</notextile>删除] 
 #if 
 #act 
 [[delAccountList]] <$str(s$file)> 
 readTxt <$str(s$file)> s0 
 print 文件内容-> s0 
 &nbsp; 
 [<notextile>@</notextile>检测账号] 
 #if 
 *%{color:green}checkAccountList%* <$str(s$file)> 
 #act 
 print 账号存在 
 #elseAct 
 print 账号不存在 
 &nbsp; 
 #if 
 #act 
 readTxt <$str(s$file)> s0 
 print 文件内容-> s0 
 &nbsp; 
 [<notextile>@</notextile>存在] 
 #if 
 [[fileExist]] <$str(s$file)> 
 #act 
 print 文件存在 
 #elseAct 
 print 文件不存在