【问题标题】:Autoit script not working自动脚本不起作用
【发布时间】:2014-07-13 07:28:01
【问题描述】:

我有一个可以运行的 AutoIt 脚本。 我需要更新脚本以打开应用程序并在某些窗口中按下某些按钮。 唯一有效的是运行应用程序:RunWait(exe file)。 当应用程序运行时,我需要在弹出的窗口上单击 OK 按钮,然后在下一个窗口上单击另一个按钮,但所有这些都不起作用。

RunWait(exe file)
WinWaitActive("win title","",10)
ControlCommand("win title","",1,"check","")

这是不工作的部分。

【问题讨论】:

    标签: automation autoit


    【解决方案1】:

    首先, 点使用 RunWait() ,而不是使用 Run()。 RunWait 将一直等到应用程序关闭。 使用 AutoItWindowInfo 工具来查找您要操作的控件的信息。

    例子:

    ControlClick("[CLASS:Notepad]", "", "[CLASS:Edit; INSTANCE:1]")
    

    也用

    Opt("WinSearchChildren", 1) ;0=no, 1=search children also
    

    这将确保您的脚本可以看到子窗口。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多