1

こんにちは、AutoIT を使用して自動的に保存するために、Web 上の Excel ファイルを取得しようとしています。

次のコードは機能しません。

#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:")
4

1 に答える 1

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.")

それは機能し、アドレスを含むダウンロードされたスプレッドシートを取得します (ほぼ正しいように聞こえます)。

マット

于 2011-04-30T10:45:49.167 に答える