找回密码
 加入
搜索
查看: 4476|回复: 9

[系统综合] 求助关于读取文本内容并显示(已解决)

  [复制链接]
发表于 2012-5-13 08:52:19 | 显示全部楼层 |阅读模式
本帖最后由 surongfu 于 2012-6-26 08:40 编辑

如图我想制作一个au3读取我指定的文本内容并显示出来  我想在输入框输入3505211 点击ok后显示3505211 密码:1852356     输入31222则显示31222 密码:7875712

声明一下以下的文本内容是一个文件后缀名是.log但可以用文本打开
以下是我的文本内容:
00:56:28 05/13/12        CloseUserEvent, AuthCode:6438, CardNo:11225274, MachineName:, IP:
00:56:28 05/13/12        OpenUserEvent, AuthCode:6438,  CardType:1, CardNo:3505211, Password:1852356, PasswordVerify:1, LoginLength:20, Name:2bee6da0b7faba005628张三, CertType:111,
00:56:47 05/13/12        RegisterEvent, AuthCode:6438, IP:192.168.0.250, UDPPort:1899, TCPPort:8888, CommInterval:30, OverTimeInterval:60
00:57:07 05/13/12        RegisterEvent, AuthCode:6438, IP:192.168.0.250, UDPPort:1899, TCPPort:8888, CommInterval:30, OverTimeInterval:60
00:57:27 05/13/12        RegisterEvent, AuthCode:6438, IP:192.168.0.250, UDPPort:1899, TCPPort:8888, CommInterval:30, OverTimeInterval:60
00:57:47 05/13/12        RegisterEvent, AuthCode:6438, IP:192.168.0.250, UDPPort:1899, TCPPort:8888, CommInterval:30, OverTimeInterval:60
00:58:07 05/13/12        RegisterEvent, AuthCode:6438, IP:192.168.0.250, UDPPort:1899, TCPPort:8888, CommInterval:30, OverTimeInterval:60
00:58:27 05/13/12        RegisterEvent, AuthCode:6438, IP:192.168.0.250, UDPPort:1899, TCPPort:8888, CommInterval:30, OverTimeInterval:60
00:58:47 05/13/12        RegisterEvent, AuthCode:6438, IP:192.168.0.250, UDPPort:1899, TCPPort:8888, CommInterval:30, OverTimeInterval:60
00:58:55 05/13/12        CloseUserEvent, AuthCode:6438, CardNo:06083607, MachineName:, IP:
00:58:55 05/13/12        OpenUserEvent, AuthCode:6438,  CardType:1, CardNo:341222, Password:7875712, PasswordVerify:1, LoginLength:20, Name:58457e3baeed9b005855李四, CertType:111,
00:59:07 05/13/12        RegisterEvent, AuthCode:6438, IP:192.168.0.250, UDPPort:1899, TCPPort:8888, CommInterval:30, OverTimeInterval:60
00:59:28 05/13/12        RegisterEvent, AuthCode:6438, IP:192.168.0.250, UDPPort:1899, TCPPort:8888, CommInterval:30, OverTimeInterval:60
00:59:48 05/13/12        RegisterEvent, AuthCode:6438, IP:192.168.0.250, UDPPort:1899, TCPPort:8888, CommInterval:30, OverTimeInterval:60
01:00:15 05/13/12        RegisterEvent, AuthCode:6438, IP:192.168.0.250, UDPPort:1899, TCPPort:8888, CommInterval:30, OverTimeInterval:60
01:00:35 05/13/12        RegisterEvent, AuthCode:6438, IP:192.168.0.250, UDPPort:1899, TCPPort:8888, CommInterval:30, OverTimeInterval:60
01:00:55 05/13/12        RegisterEvent, AuthCode:6438, IP:192.168.0.250, UDPPort:1899, TCPPort:8888, CommInterval:30, OverTimeInterval:60
01:01:16 05/13/12        RegisterEvent, AuthCode:6438, IP:192.168.0.250, UDPPort:1899, TCPPort:8888, CommInterval:30, OverTimeInterval:60

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2012-5-13 09:44:57 | 显示全部楼层
..被你弄晕了!~
发表于 2012-5-13 09:48:33 | 显示全部楼层
那个是MD数据库的 我也被你搞晕了
发表于 2012-5-13 11:09:11 | 显示全部楼层
有点搞晕了.
发表于 2012-5-13 11:26:45 | 显示全部楼层
回复 1# surongfu

09年注册的“新手”朋友:
       读取输入框数据传入子函数
       子函数里用正则读取CardNo, 返回对应Password和NAME(是否为身份证号?,如是需要还原)
发表于 2012-5-13 18:32:04 | 显示全部楼层
$a = InputBox(0,0)
$b = FileRead("1.log")
$c = StringRegExp($b,'CardNo:'&$a&', Password:(.*?), PasswordVerify',3)
MsgBox(0,0,$c[0])
发表于 2012-5-14 11:24:55 | 显示全部楼层
正则表达式很强大,虽然不是太懂
发表于 2012-5-15 08:20:32 | 显示全部楼层
过来看看,学习学习
发表于 2012-5-19 12:40:11 | 显示全部楼层
过来看看,学习学习
发表于 2012-5-19 12:40:41 | 显示全部楼层
正则表达式很强大,不断学习中
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-19 03:33 , Processed in 0.086803 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表