<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: посещаемые URL]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=6235&amp;type=atom" />
	<updated>2011-09-25T21:08:41Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=6235</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51849#p51849" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Александр_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24888</uri>
			</author>
			<updated>2011-09-25T21:08:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51849#p51849</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51756#p51756" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-09-22T22:03:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51756#p51756</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51745#p51745" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-09-22T15:37:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51745#p51745</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51730#p51730" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[propostaff]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27213</uri>
			</author>
			<updated>2011-09-22T05:05:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51730#p51730</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51728#p51728" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-09-22T01:47:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51728#p51728</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51715#p51715" />
			<content type="html"><![CDATA[<p>Можно периодически проверять содержимое адресной строки или строки состояния.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2011-09-21T15:47:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51715#p51715</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51707#p51707" />
			<content type="html"><![CDATA[<p>Урл на который зашел человек в каком-либо браузере</p>]]></content>
			<author>
				<name><![CDATA[propostaff]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27213</uri>
			</author>
			<updated>2011-09-21T11:17:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51707#p51707</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: посещаемые URL]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51699#p51699" />
			<content type="html"><![CDATA[<p>Что такое &quot;посещаемые URL&quot;?</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2011-09-20T14:28:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51699#p51699</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: посещаемые URL]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51688#p51688" />
			<content type="html"><![CDATA[<p>Возможно ли с помощью AHK отслеживать посещаемые URL и при совпадении с URL из списка производить какое-либо действие?<br />Если возможно насколько это сложно и в какую сторону копать?</p><p>Заранее спасибо за ответы.</p>]]></content>
			<author>
				<name><![CDATA[propostaff]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27213</uri>
			</author>
			<updated>2011-09-20T03:55:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51688#p51688</id>
		</entry>
</feed>
