<?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=8039&amp;type=atom" />
	<updated>2013-02-12T16:56:10Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8039</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Обновление страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69400#p69400" />
			<content type="html"><![CDATA[<p><strong>Irbis</strong><br />Познавательно. Спасибо!</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-02-12T16:56:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69400#p69400</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Обновление страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69399#p69399" />
			<content type="html"><![CDATA[<p>Пожалуйста. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2013-02-12T16:20:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69399#p69399</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Обновление страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69398#p69398" />
			<content type="html"><![CDATA[<p>Irbis, Спасибо большое</p>]]></content>
			<author>
				<name><![CDATA[AlexRam666]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29496</uri>
			</author>
			<updated>2013-02-12T15:56:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69398#p69398</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Обновление страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69397#p69397" />
			<content type="html"><![CDATA[<p>Функция StrMD5 получает <a href="http://ru.wikipedia.org/wiki/MD5"> хеш</a> от входной строки, которой является содержимое страницы. Хеши не совпадут, только если содержимое изменится. (Почему-то простое сравнение строк a и b показывало неверный результат, возможно из-за большой длины строк)</p><p> Код, показывающий адрес и предлагающий перейти к нему (в браузере по умолчанию):</p><div class="codebox"><pre><code>URL := &quot;http://forum.script-coding.com/viewtopic.php?id=8039&quot;
a := StrMD5(UrlDownloadToVar(URL))
Loop
{
   Sleep 1000 ; 10 сек
   b := StrMD5(UrlDownloadToVar(URL))
   if (a != b)
   {
      SoundPlay *48
      MsgBox, 4,, Изменилось страница: %URL% `nПерейти на страницу ?
      IfMsgBox Yes
      Run % URL
      a := b
   }
}
; далее по тексту из поста №2</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2013-02-12T15:36:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69397#p69397</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Обновление страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69300#p69300" />
			<content type="html"><![CDATA[<p>Еще вопросец. А как сделать так, что бы в сообщении высветилась активная ссылка на отслеживаемый сайт?<br />И после того как высветилось сообщение скрипт не закрывался, а продолжал отслеживать следующие изменения.</p>]]></content>
			<author>
				<name><![CDATA[AlexRam666]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29496</uri>
			</author>
			<updated>2013-02-10T08:34:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69300#p69300</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Обновление страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69299#p69299" />
			<content type="html"><![CDATA[<p>Самому интересно</p>]]></content>
			<author>
				<name><![CDATA[AlexRam666]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29496</uri>
			</author>
			<updated>2013-02-10T08:31:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69299#p69299</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Обновление страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69158#p69158" />
			<content type="html"><![CDATA[<p><strong>Irbis</strong><br />Не могли бы вы пояснить нубу назначение функции StrMD5</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-02-06T10:57:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69158#p69158</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Обновление страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69150#p69150" />
			<content type="html"><![CDATA[<p>Большое спасибо!</p>]]></content>
			<author>
				<name><![CDATA[AlexRam666]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29496</uri>
			</author>
			<updated>2013-02-06T04:15:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69150#p69150</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Обновление страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69109#p69109" />
			<content type="html"><![CDATA[<p>Скрипт в примере проверяет эту тему на обновления<br />(хотя в таком случае лучше просто подписаться <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /> )</p><div class="codebox"><pre><code>URL := &quot;http://forum.script-coding.com/viewtopic.php?id=8039&quot;
a := StrMD5(UrlDownloadToVar(URL))
Loop
{
   Sleep 10000 ; 10 сек
   b := StrMD5(UrlDownloadToVar(URL))
   if (a != b)
   {
      SoundPlay *48
      MsgBox Achtung!
      Break
   }
}
ExitApp

UrlDownloadToVar(URL, UserAgent = &quot;&quot;)
{
   WebRequest := ComObjCreate(&quot;WinHttp.WinHttpRequest.5.1&quot;)
   WebRequest.Open(&quot;GET&quot;, Url)
   UserAgent ? WebRequest.Option(WinHttpRequestOption_UserAgentString := 0) := UserAgent
   WebRequest.Send()
   Text := WebRequest.ResponseText
   WebRequest := &quot;&quot;
   return Text
}

StrMD5( V ) { ; www.autohotkey.com/forum/viewtopic.php?p=376840#376840
 VarSetCapacity( MD5_CTX,104,0 ), DllCall( &quot;advapi32\MD5Init&quot;, UInt,&amp;MD5_CTX )
 DllCall( &quot;advapi32\MD5Update&quot;, UInt,&amp;MD5_CTX, A_IsUnicode ? &quot;AStr&quot; : &quot;Str&quot;,V
 , UInt,StrLen(V) ), DllCall( &quot;advapi32\MD5Final&quot;, UInt,&amp;MD5_CTX )
 Loop % StrLen( Hex:=&quot;123456789ABCDEF0&quot; )
  N := NumGet( MD5_CTX,87+A_Index,&quot;Char&quot;), MD5 .= SubStr(Hex,N&gt;&gt;4,1) . SubStr(Hex,N&amp;15,1)
Return MD5
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2013-02-04T19:37:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69109#p69109</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Обновление страницы]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69091#p69091" />
			<content type="html"><![CDATA[<p>Доброго времени суток. Если это возможно, мне нужен следующий скрипт. Скрипт заходит на определенный сайт и каждое n количество времени обновляет его. Когда на этой странице возникает новое сообщение (любое изменение страницы) , то происходит оповещение (звуковое, текстовое, но такое, что бы при запущенном приложение я бы увидел это оповещение).<br />Заранее благодарю.</p>]]></content>
			<author>
				<name><![CDATA[AlexRam666]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29496</uri>
			</author>
			<updated>2013-02-04T06:29:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69091#p69091</id>
		</entry>
</feed>
