<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: посещаемые URL]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=6235</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=6235&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: посещаемые URL».]]></description>
		<lastBuildDate>Sun, 25 Sep 2011 21:08:41 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51849#p51849</link>
			<description><![CDATA[<div class="quotebox"><cite>propostaff пишет:</cite><blockquote><p>Возможно ли с помощью AHK отслеживать посещаемые URL и при совпадении с URL из списка производить какое-либо действие?<br />Если возможно насколько это сложно и в какую сторону копать?</p><p>Заранее спасибо за ответы.</p></blockquote></div><p>Я бы посоветовал пустить трафик интересующих вас программ через <a href="http://saur.x33.ru/">Wicked Patcher</a>. В нём имеется поддержка скриптов(описание языка <a href="http://allcheats.ru/t2983-2/">тут</a>), которые позволяют производить любые манипуляции с пакетами.</p>]]></description>
			<author><![CDATA[null@example.com (Александр_)]]></author>
			<pubDate>Sun, 25 Sep 2011 21:08:41 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51849#p51849</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51756#p51756</link>
			<description><![CDATA[<div class="quotebox"><cite>Grey пишет:</cite><blockquote><p>...правда у меня не получилось приобщить туда Google Chrome - sServer := &quot;chrome&quot;).</p></blockquote></div><p>Теперь ясно <a href="http://code.google.com/p/chromium/issues/detail?id=70184">почему</a>. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Thu, 22 Sep 2011 22:03:55 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51756#p51756</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51745#p51745</link>
			<description><![CDATA[<div class="quotebox"><cite>propostaff пишет:</cite><blockquote><p>...во всех браузерах...</p></blockquote></div><p>Не во всех, опять таки только в тех у которых адресная строка находится в <em>контроле</em> и этот <em>контрол</em> стандартный (IE, Google Chrome). Из IE я могу скопировать адрес двумя способами:</p><div class="codebox"><pre><code>DetectHiddenWindows, On
ControlGetText, CText, Edit1, ahk_class IEFrame
MsgBox, % CText</code></pre></div><p>или</p><div class="codebox"><pre><code>DetectHiddenWindows, On
PostMessage, 0xB1, 0, -1, Edit1, ahk_class IEFrame ; EM_SETSEL
Sleep, 25
PostMessage, 0x301,,, Edit1, ahk_class IEFrame ; WM_COPY
Sleep, 25
MsgBox, % Clipboard</code></pre></div><p>Из Google Chrome (почему-то не получается по классу окна...) тоже почти такими же двумя:</p><div class="codebox"><pre><code>DetectHiddenWindows, On
SetTitleMatchMode, RegEx
ControlGetText, CText, Chrome_OmniboxView1, Google Chrome
MsgBox, % CText</code></pre></div><p>и</p><div class="codebox"><pre><code>DetectHiddenWindows, On
SetTitleMatchMode, RegEx
PostMessage, 0xB1, 0, -1, Chrome_OmniboxView1, Google Chrome
Sleep, 25
PostMessage, 0x301,,, Chrome_OmniboxView1, Google Chrome
Sleep, 25
MsgBox, % Clipboard
Sleep, 25 ; в контроле остаётся выделение текста,
PostMessage, 0xB1, -1,, Chrome_OmniboxView1, Google Chrome ; приходится его снимать, чего нет в IE</code></pre></div><p>Ну а в Opera и FF, как я уже говорил, <em>контролы</em> устроены не стандартно и они не определяются, по этому считаю сбор информации через DDE технологию универсальным вариантом (правда у меня не получилось приобщить туда Google Chrome - sServer := &quot;chrome&quot;).</p>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Thu, 22 Sep 2011 15:37:05 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51745#p51745</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51730#p51730</link>
			<description><![CDATA[<p><span class="postimg"><img src="http://www.imagepost.ru/images/1/yu/1yu_3.PNG" alt="http://www.imagepost.ru/images/1/yu/1yu_3.PNG" /></span></p><p>В актив видоу инфо во всех браузерах в графе &gt;&gt;&gt;&gt;( TitleMatchMode=slow Visible Text )&lt;&lt;&lt;&lt; отображается URL открытой страницы. Можно каким-либо образом извлекать информацию от туда?</p>]]></description>
			<author><![CDATA[null@example.com (propostaff)]]></author>
			<pubDate>Thu, 22 Sep 2011 05:05:16 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51730#p51730</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51728#p51728</link>
			<description><![CDATA[<div class="quotebox"><cite>propostaff пишет:</cite><blockquote><p>Возможно ли с помощью AHK отслеживать посещаемые URL...</p></blockquote></div><p>Если в <em>браузере</em> есть стандартный <em>контрол</em> в котором располагается адресная строка, то не сложно взять от туда информацию, а вот если <em>контрол</em> не определяется как на пример в Opera или FF, то можно эту задачу решить по средству <a href="http://support.microsoft.com/kb/160957/en-us%22,%22Opera">Dynamic Data Exchange (DDE)</a>, достаточно скачать уже <a href="http://www.autohotkey.com/forum/topic19169.html">готовые решения</a> и выставить нужный браузер.<br /></p><div class="quotebox"><cite>propostaff пишет:</cite><blockquote><p>...насколько это сложно...</p></blockquote></div><p>Это Вам решать.</p><div class="codebox"><pre><code>; http://www.autohotkey.com/forum/post-121422.html&amp;sid=c2e6ca647e407e4e4514de2e39f2815c#121422
SetTimer, CheckURL, 1000
Return

CheckURL:
Itr++
;sServer := &quot;iexplore&quot;
sServer := &quot;opera&quot;
;sServer := &quot;firefox&quot;
sTopic := &quot;WWW_GetWindowInfo&quot;
sItem := &quot;0xFFFFFFFF&quot;
idInst := DdeInitialize()
hServer := DdeCreateStringHandle(idInst, sServer)
hTopic := DdeCreateStringHandle(idInst, sTopic)
hItem := DdeCreateStringHandle(idInst, sItem)
hConv := DdeConnect(idInst, hServer, hTopic)
hData := DdeClientTransaction(0x20B0, hConv, hItem)
sData := DdeAccessData(hData)
DdeFreeStringHandle(idInst, hServer)
DdeFreeStringHandle(idInst, hTopic)
DdeFreeStringHandle(idInst, hItem)
DdeUnaccessData(hData)
DdeFreeDataHandle(hData)
DdeDisconnect(hConv)
DdeUninitialize(idInst)
Loop, Parse, sData, CSV
   If A_Index = 1
      sURL := A_LoopField
   Else If A_Index = 2
      sTitle := A_LoopField
RegExMatch(sTitle, &quot;(?&lt;=\[).*(?=\])&quot;, sTitle) ; эта строка нужна, если браузер опера
If (Itr &gt;= 1 And PassedURL &lt;&gt; sURL)
{
   IfNotExist, % A_ScriptDir &quot;\HistoryURL.txt&quot;
      FileAppend, % sURL &quot;`n&quot;sTitle, % A_ScriptDir &quot;\HistoryURL.txt&quot;
   Else
   {
      Loop, Read, % A_ScriptDir &quot;\HistoryURL.txt&quot;
      {
         If (A_LoopReadLine = sURL)
            MsgBox, 4,, % &quot;совпадение в строке №&quot;A_Index
                    . &quot;`n`nтекущий URL: &quot;sURL
                      . &quot;`nURL из истории: &quot;A_LoopReadLine
                    . &quot;`n`nназвание страницы: &quot;sTitle
                    . &quot;`n`n`t`t`t`t`tпродолжить отчёт?&quot;, 2
         IfMsgBox, No
            Break
      }
      FileAppend, % &quot;`n`n&quot;sURL &quot;`n&quot;sTitle, % A_ScriptDir &quot;\HistoryURL.txt&quot;
   }
}
Else
   Itr :=
PassedURL := sURL
Return

DdeInitialize(pCallback = 0, nFlags = 0)
{
   DllCall(&quot;DdeInitialize&quot;, &quot;UIntP&quot;, idInst
                          , &quot;UInt&quot;, pCallback
                          , &quot;UInt&quot;, nFlags
                          , &quot;UInt&quot;, 0)
   Return idInst
}

DdeUninitialize(idInst)
{
   Return DllCall(&quot;DdeUninitialize&quot;, &quot;UInt&quot;, idInst)
}

DdeConnect(idInst, hServer, hTopic, pCC = 0)
{
   Return DllCall(&quot;DdeConnect&quot;, &quot;UInt&quot;, idInst
                              , &quot;UInt&quot;, hServer
                              , &quot;UInt&quot;, hTopic
                              , &quot;UInt&quot;, pCC)
}

DdeDisconnect(hConv)
{
   Return DllCall(&quot;DdeDisconnect&quot;, &quot;UInt&quot;, hConv)
}

DdeAccessData(hData)
{
   Return DllCall(&quot;DdeAccessData&quot;, &quot;UInt&quot;, hData, &quot;UInt&quot;, 0, &quot;Str&quot;)
}

DdeUnaccessData(hData)
{
   Return DllCall(&quot;DdeUnaccessData&quot;, &quot;UInt&quot;, hData)
}

DdeFreeDataHandle(hData)
{
   Return DllCall(&quot;DdeFreeDataHandle&quot;, &quot;UInt&quot;, hData)
}

DdeCreateStringHandle(idInst, sString, nCodePage = 1004)
{
   Return DllCall(&quot;DdeCreateStringHandle&quot;, &quot;UInt&quot;, idInst
                                         , &quot;UInt&quot;, &amp;sString
                                         , &quot;int&quot;, nCodePage)
}

DdeFreeStringHandle(idInst, hString)
{
   Return DllCall(&quot;DdeFreeStringHandle&quot;, &quot;UInt&quot;, idInst, &quot;UInt&quot;, hString)
}

DdeClientTransaction(nType, hConv, hItem, sData = &quot;&quot;
                   , nFormat = 1, nTimeOut = 10000)
{
   Return DllCall(&quot;DdeClientTransaction&quot;, &quot;UInt&quot;, sData = &quot;&quot; ? 0 : &amp;sData
                                        , &quot;UInt&quot;, sData = &quot;&quot; ? 0 : StrLen(sData)+1
                                        , &quot;UInt&quot;, hConv
                                        , &quot;UInt&quot;, hItem
                                        , &quot;UInt&quot;, nFormat
                                        , &quot;UInt&quot;, nType
                                        , &quot;UInt&quot;, nTimeOut
                                        , &quot;UIntP&quot;, nResult)
}

Esc::ExitApp</code></pre></div><p>Чуть подправил код, потому как, когда совпадений много, то устанешь ждать, пока они все отобразятся.</p>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Thu, 22 Sep 2011 01:47:50 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51728#p51728</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51715#p51715</link>
			<description><![CDATA[<p>Можно периодически проверять содержимое адресной строки или строки состояния.</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Wed, 21 Sep 2011 15:47:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51715#p51715</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51707#p51707</link>
			<description><![CDATA[<p>Урл на который зашел человек в каком-либо браузере</p>]]></description>
			<author><![CDATA[null@example.com (propostaff)]]></author>
			<pubDate>Wed, 21 Sep 2011 11:17:01 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51707#p51707</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51699#p51699</link>
			<description><![CDATA[<p>Что такое &quot;посещаемые URL&quot;?</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Tue, 20 Sep 2011 14:28:13 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51699#p51699</guid>
		</item>
		<item>
			<title><![CDATA[AHK: посещаемые URL]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51688#p51688</link>
			<description><![CDATA[<p>Возможно ли с помощью AHK отслеживать посещаемые URL и при совпадении с URL из списка производить какое-либо действие?<br />Если возможно насколько это сложно и в какую сторону копать?</p><p>Заранее спасибо за ответы.</p>]]></description>
			<author><![CDATA[null@example.com (propostaff)]]></author>
			<pubDate>Tue, 20 Sep 2011 03:55:33 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51688#p51688</guid>
		</item>
	</channel>
</rss>
