2011-04-28 2 views
1

안녕하세요, AutoIT를 사용하여 자동으로 저장하려면 웹에서 Excel 파일을 가져 오려고합니다.AutoIT 테스팅 도움말

다음 코드는 작동하지 않습니다 :

#include <IE.au3> 
$oIE = _IECreate ("http://127.0.0.1/my_site") 
_IENavigate ($oIE, "http://databases.about.com/library/samples/address.xls") 

WinWait("File Download","Do you want to open or save this file?") 
ControlClick("File Download","Do you want to open or save this file","Button2") 
WinWait("Save As","Save &in:") 
+2

무엇이 작동하지 않습니까? 오류가 있습니까? 좀 더 자세한 정보를 알려주십시오. – JohnD

답변

1

는 IE가 올바른 방법이 아니다 사용하여이 작업을 수행하려고합니다.

InetGet 기능을 사용해 보셨습니까?

Local $sFileName = FileSaveDialog("Save excel file...", @MyDocumentsDir, "Excel spreadsheet (*.xls)|All Files (*.*)", 18, "address.xls") 
If @error Then Exit ; User cancelled the dialog 

Local $iBytes = InetGet("http://databases.about.com/library/samples/address.xls", $sFileName, 8) 
MsgBox(0, "Worked :)", "File downloaded. " & $iBytes & " downloaded.") 

제대로 작동하며 주소가 다운로드 된 스프레드 시트 (올바른 소리)가 표시됩니다.

매트