CheckAccountList » 历史记录 » 版本 2
machenhe, 2022-04-28 15:39
| 1 | 2 | machenhe | _*%{color:green}checkAccountList%*_ |
|---|---|---|---|
| 2 | 1 | machenhe | 检测账号是否在指定文件中 |
| 3 | |||
| 4 | |||
| 5 | 标签:命令定义|checkAccountList |
||
| 6 | |||
| 7 | *格式* |
||
| 8 | |命令名 |参数1 | |
||
| 9 | |checkAccountList|文件路径 | |
||
| 10 | |||
| 11 | *说明* |
||
| 12 | * 参数1: 检测文件路径 |
||
| 13 | 路径需要基于..\\Mir200\\Envir |
||
| 14 | %{color:lightGrey}举例 |
||
| 15 | 设定检测路径为 |
||
| 16 | \\testlist.txt |
||
| 17 | 完整检测路径 |
||
| 18 | ..\\Mir200\\Envir\\testlist.txt% |
||
| 19 | |||
| 20 | - |
||
| 21 | - |
||
| 22 | |||
| 23 | *%{color:deepskyblue}特戒引擎脚本示例:%* |
||
| 24 | |||
| 25 | bq. [<notextile>@</notextile>main] |
||
| 26 | #act |
||
| 27 | mov s$file \\数据文件\\测试非预制数据文件.txt |
||
| 28 | #say |
||
| 29 | <增加账号/<notextile>@</notextile>添加>\\ \\ |
||
| 30 | <删除文件中账号/<notextile>@</notextile>删除>\\ \\ |
||
| 31 | <检测账号是否在文件中/<notextile>@</notextile>检测账号>\\ \\ |
||
| 32 | <检测文件存在/<notextile>@</notextile>存在>\\ \\ |
||
| 33 | |
||
| 34 | [<notextile>@</notextile>添加] |
||
| 35 | #act |
||
| 36 | [[addAccountList]] <$str(s$file)> |
||
| 37 | [[readTxt]] <$str(s$file)> s0 |
||
| 38 | %{color:lightGrey};print命令在控制台输出文件内容% |
||
| 39 | print 文件内容-> s0 |
||
| 40 | |
||
| 41 | [<notextile>@</notextile>删除] |
||
| 42 | #if |
||
| 43 | #act |
||
| 44 | [[delAccountList]] <$str(s$file)> |
||
| 45 | readTxt <$str(s$file)> s0 |
||
| 46 | print 文件内容-> s0 |
||
| 47 | |
||
| 48 | [<notextile>@</notextile>检测账号] |
||
| 49 | #if |
||
| 50 | *%{color:green}checkAccountList%* <$str(s$file)> |
||
| 51 | #act |
||
| 52 | print 账号存在 |
||
| 53 | #elseAct |
||
| 54 | print 账号不存在 |
||
| 55 | |
||
| 56 | #if |
||
| 57 | #act |
||
| 58 | readTxt <$str(s$file)> s0 |
||
| 59 | print 文件内容-> s0 |
||
| 60 | |
||
| 61 | [<notextile>@</notextile>存在] |
||
| 62 | #if |
||
| 63 | [[fileExist]] <$str(s$file)> |
||
| 64 | #act |
||
| 65 | print 文件存在 |
||
| 66 | #elseAct |
||
| 67 | print 文件不存在 |