<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: chrome.ahk как имитировать клик средней мышкой по ссылке?]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14351&amp;type=atom" />
	<updated>2018-11-26T16:27:06Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=14351</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: chrome.ahk как имитировать клик средней мышкой по ссылке?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130067#p130067" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />А вот за это еще больше спасибо.<br /><em>Ушел переделывать некоторые свои скрипты. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /> </em></p>]]></content>
			<author>
				<name><![CDATA[Gh0sTG0]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39523</uri>
			</author>
			<updated>2018-11-26T16:27:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130067#p130067</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: chrome.ahk как имитировать клик средней мышкой по ссылке?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130066#p130066" />
			<content type="html"><![CDATA[<p>Активировать можно любую вкладку по её ID:<br /></p><div class="codebox"><pre><code>#Persistent
profile := A_Temp
arrUrls := [&quot;http://forum.script-coding.com/&quot;, &quot;https://autohotkey.com/boards/index.php&quot;]
oChrome := new Chrome(profile, arrUrls)
oPage := oChrome.GetActivePage()
id := oChrome.GetPageList()[1].id

MsgBox, Сейчас откроем новую страницу
oPage.Call(&quot;Target.createTarget&quot;, {url: &quot;http://forum.script-coding.com/misc.php?action=rules&quot;})
oPage.Call(&quot;Target.activateTarget&quot;, {targetId: id})</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-11-26T16:25:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130066#p130066</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: chrome.ahk как имитировать клик средней мышкой по ссылке?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130065#p130065" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, Но созданная вкладка становится активной. Т.е. потом придется любым удобным методом все равно искать ту, с которой начинал.<br />Но все равно спасибо, приемчик запомню, вроде уже знаю где он может пригодиться.</p>]]></content>
			<author>
				<name><![CDATA[Gh0sTG0]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39523</uri>
			</author>
			<updated>2018-11-26T16:10:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130065#p130065</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: chrome.ahk как имитировать клик средней мышкой по ссылке?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130064#p130064" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>#Persistent
profile := A_Temp
arrUrls := [&quot;http://forum.script-coding.com/&quot;, &quot;https://autohotkey.com/boards/index.php&quot;]
oChrome := new Chrome(profile, arrUrls)
oPage := oChrome.GetActivePage()
MsgBox, Сейчас откроем новую страницу
oPage.Call(&quot;Target.createTarget&quot;, {url: &quot;http://forum.script-coding.com/misc.php?action=rules&quot;})</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-11-26T16:01:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130064#p130064</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: chrome.ahk как имитировать клик средней мышкой по ссылке?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130063#p130063" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />В смысле? Не очень понял что вы имеете ввиду. Можно как то вставить задержку между созданием вкладок не запихивая в цикл run chrome.exe с каждой ссылкой и слипом??</p>]]></content>
			<author>
				<name><![CDATA[Gh0sTG0]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39523</uri>
			</author>
			<updated>2018-11-26T15:58:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130063#p130063</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: chrome.ahk как имитировать клик средней мышкой по ссылке?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130062#p130062" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong><br />Вроде все поправил.</p>]]></content>
			<author>
				<name><![CDATA[Gh0sTG0]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39523</uri>
			</author>
			<updated>2018-11-26T15:54:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130062#p130062</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: chrome.ahk как имитировать клик средней мышкой по ссылке?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130061#p130061" />
			<content type="html"><![CDATA[<p><strong>Gh0sTG0</strong>, вкладки можно задать сразу при создании объекта. Если нужно новую открыть позже, тоже делается через объект, как исправитесь, могу подсказать.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-11-26T15:52:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130061#p130061</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: chrome.ahk как имитировать клик средней мышкой по ссылке?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130060#p130060" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>Gh0sTG0</strong>, проставьте недостающие точки в сообщениях!</span><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=130059#p130059">http://forum.script-coding.com/viewtopi … 59#p130059</a><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=130056#p130056">http://forum.script-coding.com/viewtopi … 56#p130056</a><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=129763#p129763">http://forum.script-coding.com/viewtopi … 63#p129763</a><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=129623#p129623">http://forum.script-coding.com/viewtopi … 23#p129623</a><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=129464#p129464">http://forum.script-coding.com/viewtopi … 64#p129464</a><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=129462#p129462">http://forum.script-coding.com/viewtopi … 62#p129462</a><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=129459#p129459">http://forum.script-coding.com/viewtopi … 59#p129459</a><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=129285#p129285">http://forum.script-coding.com/viewtopi … 85#p129285</a><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=129282#p129282">http://forum.script-coding.com/viewtopi … 82#p129282</a><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=129240#p129240">http://forum.script-coding.com/viewtopi … 40#p129240</a></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2018-11-26T15:44:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130060#p130060</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: chrome.ahk как имитировать клик средней мышкой по ссылке?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130059#p130059" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Переделал в другой вариант, вроде работает.<br /></p><div class="codebox"><pre><code>urlList		:= &quot;&quot;
for index, value in elL
	urlList	.= ((A_Index = 1) ? &quot;&quot; : &quot; &quot;) . value

Run, % &quot;chrome.exe &quot; urlList</code></pre></div><p>Вроде получилось неплохо, они открываются.<br />Опять сработала магическая штука &quot;напиши на script-coding и найдешь ответ, даже если тебе его не напишут прямо, ты все равно его в ближайшее время нагуглишь&quot;. Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[Gh0sTG0]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39523</uri>
			</author>
			<updated>2018-11-26T15:31:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130059#p130059</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: chrome.ahk как имитировать клик средней мышкой по ссылке?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130058#p130058" />
			<content type="html"><![CDATA[<p>А зачем нужно именно эмулировать нажатие средней кнопкой? Просто откройте новую вкладку с нужным url.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-11-26T15:27:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130058#p130058</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: chrome.ahk как имитировать клик средней мышкой по ссылке?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130056#p130056" />
			<content type="html"><![CDATA[<p>Добрый вечер. Вопрос на стыке ahk и хромовской консоли. Может я слепой, но так и не нашел вменяемых безЧСВшных объяснений в интернете, которые бы заработали из ahk под chrome.ahk.</p><p>Как сделать реакцию = клику средней кнопкой мыши по ссылке? Т.е. открыть ссылку в новой фоновой вкладке?</p><div class="codebox"><pre><code>PageInst := Chrome.GetPage(1)
numEl := PageInst.Evaluate(&quot;document.getElementsByClassName(&#039;thumb&#039;).length;&quot;).Value
Loop %numEl%
{
	lnk := PageInst.Evaluate(&quot;document.getElementsByClassName(&#039;thumb&#039;)[&quot; . A_Index - 1 . &quot;].href;&quot;)
	[по идее я получил ссылку на страницу куда надо идти. если вместо href делать click() он откроет все подряд в той же вкладке...]
}</code></pre></div><p>Либо скажите, &quot;это невозможно&quot; и я пойду дальше юзать свой тупой костыльный цикл.<br /></p><div class="codebox"><pre><code>	for index, element in elL
	{
		Sleep 300
		Send ^t
		Sleep 500
		Clipboard := element
		Sleep 200
		Send ^v
		Sleep 200
		Send {Enter}
	}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Gh0sTG0]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39523</uri>
			</author>
			<updated>2018-11-26T15:02:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130056#p130056</id>
		</entry>
</feed>
