找回密码
 加入
搜索
查看: 2376|回复: 5

[AU3基础] 求助把里面的内容一直循环下去不结束

  [复制链接]
发表于 2010-8-28 11:31:38 | 显示全部楼层 |阅读模式
本帖最后由 dgnetvin 于 2010-8-28 14:52 编辑

出现五个可能性的窗口,要不停运作下去。下面的是可能出现的窗口内容。我是新手好多不会用,请帮我写下去
这个一个文化的刷卡系统,每刷一张卡都是按几次确认有点烦,想一刷卡后自动点确认,不用人工操作。

WinWaitActive ("卡信息查询","姓名")
ControlClick("卡信息查询", "", "[CLASS:Button; TEXT:确定; INSTANCE:1]")
WinWaitActive ("天翼系统","该卡已激活!")
ControlClick("天翼系统", "", "[CLASS:Button; TEXT:确定; INSTANCE:1]")
WinWaitActive ("天翼系统","此卡已激活!")
ControlClick("天翼系统", "", "[CLASS:Button; TEXT:确定; INSTANCE:1]")
WinWaitActive ("天翼系统","此卡在线,是否下机?")
ControlClick("天翼系统", "", "[CLASS:Button; TEXT:取消; INSTANCE:1]")
WinWaitActive ("天翼系统","此卡非法,是否更新卡号加密包")
ControlClick("天翼系统", "", "[CLASS:Button; TEXT:取消; INSTANCE:1]")


我上网查了点资料改为这样不知行不行,大家帮我看看
If WinExists("卡信息查询","姓名") Then
ControlClick("卡信息查询", "", "[CLASS:Button; TEXT:确定; INSTANCE:1]")
Endif
If WinExists("天翼系统","该卡已激活!") Then
Send("{ENTER}")
Endif
If WinExists("天翼系统","此卡已激活!") Then
Send("{ENTER}")
Endif
If WinExists("天翼系统","此卡在线,是否下机?") Then
ControlClick("天翼系统", "", "[CLASS:Button; TEXT:取消; INSTANCE:1]")
Endif
If WinExists("天翼系统","此卡非法,是否更新卡号加密包") Then
ControlClick("天翼系统", "", "[CLASS:Button; TEXT:取消; INSTANCE:1]")
Endif

本帖子中包含更多资源

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

×
发表于 2010-8-28 13:49:42 | 显示全部楼层
东莞?
发表于 2010-8-28 14:37:05 | 显示全部楼层
while 1

WinWaitActive ("卡信息查询","姓名")
ControlClick("卡信息查询", "", "[CLASS:Button; TEXT:确定; INSTANCE:1]")
WinWaitActive ("天翼系统","该卡已激活!")
ControlClick("天翼系统", "", "[CLASS:Button; TEXT:确定; INSTANCE:1]")
WinWaitActive ("天翼系统","此卡已激活!")
ControlClick("天翼系统", "", "[CLASS:Button; TEXT:确定; INSTANCE:1]")
WinWaitActive ("天翼系统","此卡在线,是否下机?")
ControlClick("天翼系统", "", "[CLASS:Button; TEXT:取消; INSTANCE:1]")
WinWaitActive ("天翼系统","此卡非法,是否更新卡号加密包")
ControlClick("天翼系统", "", "[CLASS:Button; TEXT:取消; INSTANCE:1]")

wend
发表于 2010-8-28 15:53:05 | 显示全部楼层
循环 是我们新手的一大坎啊,我不会,只能帮顶
发表于 2010-8-28 17:03:12 | 显示全部楼层
见三楼,最好再Sleep一下,不然CPU占用会很高的
发表于 2010-8-28 17:41:28 | 显示全部楼层
If WinExists("天翼系统","该卡已激活!") Then
    ...

ElseIf WinExists("天翼系统","此卡已激活!") Then
    ...

ElseIf WinExists("天翼系统","此卡已激活!") Then
    ...


ElseIf WinExists("天翼系统","此卡在线,是否下机?") Then
    ...

ElseIf WinExists("天翼系统","此卡非法,是否更新卡号加密包") Then
    ...


[Else
    ...

EndIf
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-15 07:28 , Processed in 0.125892 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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