【问题标题】:Create general purpose WinWaitActive in AutoIT在 AutoIT 中创建通用 WinWaitActive
【发布时间】:2017-07-20 03:44:59
【问题描述】:

我正在考虑使用 WinWaitActive 函数在当前活动程序每次完成任务时播放声音文件(即 After Effect 完成渲染、Word 完成保存等)。

根据我对 WinWaitActive 的了解,我需要为每个应用程序的每个内部进程编写一个脚本。这是大量的自动化脚本。有没有办法制作一个适用于所有程序和进程的脚本?

【问题讨论】:

    标签: automation autoit


    【解决方案1】:

    试试这样的:

    #include<array.au3>
    Global $window_Array[1]
    
    $window = "dokument - wordpad"
    checkWin()
    
    ;ConsoleWrite(_ArrayToString($window_Array, @CR))
    
    Func checkWin()
        Global $var = WinList()
        For $i = 1 To $var[0][0]
            If $var[$i][0] <> "" Then _ArrayAdd($window_Array, $var[$i][0])
            Next
        If _ArraySearch($window_Array, $window, 0, 0, 0) <> - 1 Then
            MsgBox(0, "", "Found!")
        Else
            MsgBox(0, "", "Not Found!")
        EndIf
    EndFunc   ;==>checkWin
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-21
      • 2019-01-14
      • 1970-01-01
      • 1970-01-01
      • 2011-11-22
      • 1970-01-01
      相关资源
      最近更新 更多