AutoIt脚本没有明显原因挂起


0

我坚持使用这个脚本。多年来它没有用。然后它突然发生了......现在......重新安装......它再也不起作用了。它停在第一个winwaitactive线上。该文件夹肯定是正确的。

    #include <File.au3>
    #include <Array.au3>

    AutoItSetOption ("WinTitleMatchMode", 1)
    AutoItSetOption ("WinTextMatchMode", 2)
    AutoItSetOption ("TrayIconDebug", 1)

    $folder = "F:\MUSIC SOFTWARE\BIAB\TRACKS\REALTRACKS\"

    Local $files = _FileListToArray($folder, "*")

    For $i = 1 to UBound($files)
        install($files[$i])
    Next

    Func install($file)
       $pid = Run($file)
       WinWaitActive("Setup - RealTracks", "Welcome to the RealTracks")
       Send("!n")
       WinWait("Setup - RealTracks", "Please read")
       Send("!a")
       Send("!n")
       WinWait("Setup - RealTracks", "When you are ready")
       Send("!n")
       WinWait("Setup - RealTracks", "Where should")
       Send("!n")
       WinWait("Setup - RealTracks", "Setup is now ready")
       Send("!i")
       WinWait("Setup - RealTracks", "Completing")
       Send("!f")
       ProcessWaitClose($pid)
    EndFunc

相当明显的解决方案......只需要添加$ folder install($ folder&$ files [$ i])
user3261239 2014年

Answers:


0

查看您的脚本,该$File变量没有声明。此外,您正在使用,wintitlematchmode, 2因此您不需要在窗口符号中如此明确。而不是Setup - RealTracks尝试只是RealTracks

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.