<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Проверка скаченного файла]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11228&amp;type=atom" />
	<updated>2016-01-17T21:36:44Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11228</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проверка скаченного файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100452#p100452" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, в любом случае спасибо за подсказку.</p>]]></content>
			<author>
				<name><![CDATA[exobangs]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32958</uri>
			</author>
			<updated>2016-01-17T21:36:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100452#p100452</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проверка скаченного файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100399#p100399" />
			<content type="html"><![CDATA[<p>Наверное MD5 можно как-то посчитать.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2016-01-16T21:16:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100399#p100399</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проверка скаченного файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100396#p100396" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong> устраивает, просто хотелось бы побольше примеров, думаю не только мне будет полезно.</p>]]></content>
			<author>
				<name><![CDATA[exobangs]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32958</uri>
			</author>
			<updated>2016-01-16T20:30:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100396#p100396</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проверка скаченного файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100395#p100395" />
			<content type="html"><![CDATA[<p>А чем не устраивает этот?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2016-01-16T20:29:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100395#p100395</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проверка скаченного файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100394#p100394" />
			<content type="html"><![CDATA[<p>а какие варианты есть еще?</p>]]></content>
			<author>
				<name><![CDATA[exobangs]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32958</uri>
			</author>
			<updated>2016-01-16T20:11:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100394#p100394</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проверка скаченного файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100384#p100384" />
			<content type="html"><![CDATA[<p>Можно узнавать размер файла до скачивания и сравнивать его с размером после скачивания.<br /></p><div class="codebox"><pre><code>MsgBox % InternetFileGetSize( &quot;ftp://ftp.winzip.com/testdown/testdown.htm&quot; )
MsgBox % InternetFileGetSize( &quot;http://ahkscript.org/favicon.ico&quot; )
 
InternetFileGetSize( URL ) {
 
  hMod := DllCall( &quot;LoadLibrary&quot;, WStr, &quot;wininet.dll&quot; )
 
  hIO  := DllCall( &quot;wininet\InternetOpenW&quot;
                 , WStr, &quot;Microsoft Internet Explorer&quot; 
                 , UInt, 4          ; INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY
                 , Int,  0, Int, 0, UInt, 0 )
 
  hIU  := DllCall( &quot;wininet\InternetOpenUrlW&quot;
                 , UInt, hIO, WStr, URL, Int, 0, Int, 0
                 , UInt, 0x84000000 ; INTERNET_FLAG_DONT_CACHE|INTERNET_FLAG_RELOAD
                 , UInt, 0 )
 
  If ( hIO &amp; hIU ) 
 
   If ( SubStr( URL,1,4 ) = &quot;ftp:&quot; )
   {
      varSetCapacity(huint,4)
      FileSize:=DllCall( &quot;wininet\FtpGetFileSize&quot;, UInt,hIU,UInt,&amp;huint,UInt)
      FileSize := FileSize + (NumGet(huint)*(2**32))
   }

   Else  DllCall( &quot;wininet\HttpQueryInfoW&quot;
                , UInt,  hIU
                , UInt,  0x20000005     ; HTTP_QUERY_CONTENT_LENGTH|HTTP_QUERY_FLAG_NUMBER
                , UIntP, FileSize, UIntP,4, Int,0 )


  DllCall( &quot;wininet\InternetCloseHandle&quot;, UInt, hIU )
  DllCall( &quot;wininet\InternetCloseHandle&quot;, UInt, hIO )
  DllCall( &quot;FreeLibrary&quot;, UInt, hMod ) 
  Return FileSize
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2016-01-16T17:39:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100384#p100384</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Проверка скаченного файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100378#p100378" />
			<content type="html"><![CDATA[<p>Как проверить полностью ли скачен файл через UrlDownloadToFile?</p>]]></content>
			<author>
				<name><![CDATA[exobangs]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32958</uri>
			</author>
			<updated>2016-01-16T11:28:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100378#p100378</id>
		</entry>
</feed>
