;--help ;--查找窗口属性 ;$text = WinGetClassList("Choose Destination Format", "") ;MsgBox(0, "类列表为:", $text) ;--命令行参数说明 ;命令行参数一 原始音频文件目录 ;$audiopre=$CmdLine[1] ;命令行参数二 转码后音频文件目录 ;$audiodecode=$CmdLine[2] ;autoit 运行范例 ;AutoIt3.exe E:\原始音频文件\标准A D:\audio-out ;--自动化转码核心流程 ;打开编码软件 $begin = TimerInit() $PID =Run("C:\Program Files (x86)\Transcode\Transcode.exe") WinWaitActive("[CLASS:Transcode]") ;输入目标文件夹 ControlSetText("[CLASS:Transcode]", "", "Edit1", "E:\项目文件\" ) ;点击Refresh按钮 ControlClick("[CLASS:Transcode]", "", "Button2") ;选中文件 ControlListView("[CLASS:Transcode]", "", "SysListView321", "SelectAll") ;打印选中文件数量 $fileNum="选中文件数量:"&ControlListView("[CLASS:Transcode]", "", "SysListView321", "GetSelectedCount") ;选择输出文件夹 DirCreate ("D:\audio-out") ;确保输出文件夹已经存在 ControlSetText("[CLASS:Transcode]", "", "Edit2", "D:\audio-out" ) ;调用输出格式选择 ControlClick("[CLASS:Transcode]", "", "Button10") ;选择音频格式 WinWaitActive("Choose Destination Format") ControlCommand("Choose Destination Format", "", "ComboBox2", "SelectString", "PCM") ;点击确定按钮 ControlClick("Choose Destination Format", "", "Button3") ;将选中文件转换为PCM格式 ControlClick("[CLASS:Transcode]", "", "Button11") ;计算音频转码耗时 $dif = TimerDiff($begin) ;记录操作日志 $logfile = FileOpen("D:\audio-out\exec_log.txt", 1) FileWriteLine ($logfile,@UserName&","&getCurrentTime()&",本次执行耗时(ms):"&$dif&",原始文件目录:E:\原始音频文件\A标准"&",输出目录:D:\audio-out"&","&$fileNum) FileClose($logfile) ;检测文件状态 $i = 0 ;关闭软件(需要研究) ;If $PID Then ProcessClose ($PID) ;--获取时间函数 Func getCurrentTime() $time = @YEAR&"-"&@MON&"-"&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC&":"&@MSEC Return $time EndFunc
-------------Api 文档地址----------------------------------------
-------------Auto It 下载地址----------------------------------------
选第一个 download 下载安装即可
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于