forked from chudongjingling/open_code
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88a8b89
commit 53850e0
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
------------------------------------- 读取账号 | ||
local Users ={} --初始化账号表 | ||
file = io.open("/User/Media/TouchSprite/wenben/test.txt","r") --打开文件流 | ||
for line in file:lines() do --一行一行读取 | ||
string.match(table.insert(Users,line),'%C+') | ||
end | ||
file:close() --关闭文件流 | ||
------------------------------------- | ||
|
||
|
||
------------------------------------- 登陆部分 | ||
function Login(User,Pass) | ||
--User是账号 | ||
--Pass是密码 | ||
--inputText即可 | ||
|
||
end | ||
------------------------------------- | ||
|
||
------------------------------------- 循环账号表 | ||
for UserPass in ipairs(Users) do --以Table 遍历账号表 | ||
local User, Pass = string.match(UserPass, "([^-]*)[-]*([^-]*)[-]*([^-]*)[-]*([^%c-]*)[-]*") --拆分账号密码 | ||
Login(User, Pass) --调用登陆函数 | ||
end | ||
------------------------------------- |