Anarasius
23-07-2010, 21:08
Как сохранить веб страницу по указанному адресу, желательно в ТХТ
madmasles
23-07-2010, 21:24
Anarasius,
Попробуйте так:#include (http://www.autoitscript.com/autoit3/docs/keywords.htm##include) <INet.au3>
$sSource = _INetGetSource (http://dundats.mvps.org/help/html/libfunctions/_inetgetsource.htm)('http://Ваша страница')
If (http://www.autoitscript.com/autoit3/docs/keywords.htm#If) $sSource <> '' Then (http://www.autoitscript.com/autoit3/docs/keywords.htm#Then)
$hFile = FileOpen (http://www.autoitscript.com/autoit3/docs/functions/FileOpen.htm)(@ScriptDir (http://www.autoitscript.com/autoit3/docs/macros.htm#@scriptdir) & '\Test.txt', 2)
FileWrite (http://www.autoitscript.com/autoit3/docs/functions/FileWrite.htm)($hFile, $sSource)
FileClose (http://www.autoitscript.com/autoit3/docs/functions/FileClose.htm)($hFile)
MsgBox (http://www.autoitscript.com/autoit3/docs/functions/MsgBox.htm)(0, 'OK', 'OK')
Else (http://www.autoitscript.com/autoit3/docs/keywords.htm#Else)
MsgBox (http://www.autoitscript.com/autoit3/docs/functions/MsgBox.htm)(0, 'Error', 'Error')
EndIf (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndIf)
vBulletin v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.