<?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="http://forum.script-coding.com/extern.php?action=feed&amp;tid=14728&amp;type=atom" />
	<updated>2019-04-25T10:33:51Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=14728</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Chrome_ahk]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=133828#p133828" />
			<content type="html"><![CDATA[<p>Если память мне не изменяет:<br /></p><div class="codebox"><pre><code>PageInstance.Call(&quot;Target.createTarget&quot;, {&quot;url&quot;: &quot;http://forum.script-coding.com&quot;})</code></pre></div><p>После этого, можно плучить список всех активных вкладок, сервисов, воркеров ... — <a href="https://github.com/G33kDude/Chrome.ahk/blob/master/Chrome.ahk#L109">GetPageList()</a>:<br /></p><div class="codebox"><pre><code>ChromeInst.GetPageList()</code></pre></div><p>Перебрать полученный объект в цикле For и проверяя на нужное соответствие полей каждого элемента, определить, нужен ли текущий элемент. По ссылке, следующий после примера метод демонстрирует нужное поведение.</p><p>Создание новой вкладки вернёт её идентификатор, по которому её так же можно будет определить.</p>]]></content>
			<author>
				<name><![CDATA[KusochekDobra]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=33846</uri>
			</author>
			<updated>2019-04-25T10:33:51Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=133828#p133828</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Chrome_ahk]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=133826#p133826" />
			<content type="html"><![CDATA[<p><strong>KusochekDobra</strong> Извините, а можно небольшой наглядный пример?</p>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2019-04-25T07:33:39Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=133826#p133826</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Chrome_ahk]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=133725#p133725" />
			<content type="html"><![CDATA[<p><a href="https://chromedevtools.github.io/devtools-protocol/tot/Target#method-createTarget">Воз-но</a>.</p>]]></content>
			<author>
				<name><![CDATA[KusochekDobra]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=33846</uri>
			</author>
			<updated>2019-04-21T10:51:50Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=133725#p133725</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Chrome_ahk]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=133721#p133721" />
			<content type="html"><![CDATA[<p>Добрый день! Подскажите пож-та, возможно работать сразу с несколькими вкладками в хроме?</p><br /><div class="codebox"><pre><code>#SingleInstance force 
#Include Chrome.ahk ; https://www.autohotkey.com/boards/viewtopic.php?t=42890

FileCreateDir, ChromeProfile

ChromeInst := new Chrome(&quot;ChromeProfile&quot;)

PageInstance := ChromeInst.GetPage()
PageInstance.Call(&quot;Page.navigate&quot;, {&quot;url&quot;: &quot;https://www.google.com/&quot;})
PageInstance.WaitForLoad()

PageInstance.Evaluate(&quot;document.getElementsByClassName(&#039;gLFyf gsfi&#039;)[0].value= &#039;WTF&#039;;&quot;)
MsgBox % PageInstance.Evaluate(&quot;document.getElementsByClassName(&#039;gLFyf gsfi&#039;)[0].value;&quot;).value


ChromeInst_1 := new Chrome(&quot;ChromeProfile&quot;)
PageInstance_1 := ChromeInst_1.GetPage()
PageInstance_1.Call(&quot;Page.navigate&quot;, {&quot;url&quot;: &quot;https://www.yahoo.com/&quot;})
PageInstance_1.WaitForLoad()

PageInstance_1.Evaluate(&quot;document.getElementById(&#039;uh-search-box&#039;).value= &#039;WTF&#039;;&quot;)
MsgBox % PageInstance_1.Evaluate(&quot;document.getElementById(&#039;uh-search-box&#039;).value;&quot;).value


PageInstance.Call(&quot;Browser.close&quot;)
PageInstance.Disconnect()

PageInstance_1.Call(&quot;Browser.close&quot;)
PageInstance_1.Disconnect()

ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2019-04-21T09:53:52Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=133721#p133721</id>
		</entry>
</feed>
