下面是一个坛友写的代码,想知道这个按钮名是如何找到的。
#RequireAdmin
#include <ie.au3>
ShellExecute('Set-up.exe')
; 等待窗口出现并激活它
Local $hWnd1 = WinWait('[title:Illustrator 2020 安装程序; class:AdobeInstallerWindowClass]', '', 30) ; 等待30秒
Local $hWnd = WinGetHandle('[title:Illustrator 2020 安装程序; class:AdobeInstallerWindowClass]')
Local $hWnd_IE = ControlGetHandle($hWnd, '', '[CLASS:Internet Explorer_Server; INSTANCE:1]')
Local $oIE = _IEAttach($hWnd, 'embedded')
Local $oFrame = _IEFrameGetCollection($oIE, 0)
Local $sPath = 'D:\Program Files';路径
$oFrame.document.parentWindow.execscript('pathSelectedInFileBrowserReturned("' & StringReplace($sPath, '\', '\\') & '")', "javascript");设置路径
Sleep(4000)
$oBtn = _IEGetObjById($oFrame ,'continueButton')
$oBtn.click()
|