<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Через chrome.ahk получить список вкладок и закрыть по условию?]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=16571</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=16571&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Через chrome.ahk получить список вкладок и закрыть по условию?».]]></description>
		<lastBuildDate>Sun, 05 Sep 2021 17:47:36 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Через chrome.ahk получить список вкладок и закрыть по условию?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149477#p149477</link>
			<description><![CDATA[<div class="quotebox"><cite>Gh0sTG0 пишет:</cite><blockquote><p>Может ли chrome.ahk закрывать вкладки?</p></blockquote></div><p>Если кому понадобится:<br /></p><div class="codebox"><pre><code>profile := A_Temp . &quot;\ChromeProfile&quot;
url1 := &quot;https://vk.com/&quot;
url2 := &quot;https://forum.script-coding.com/&quot;

ChromeInst := new Chrome(profile, [url1, url2])
Loop 20 {
   try Page := ChromeInst.GetPageByURL(url2)
   Sleep 1000
} until Page
if !Page
   throw &quot;Failed to get the Page object&quot;
Page.WaitForLoad()
res := Page.Call(&quot;Target.getTargets&quot;)
for k, v in res.targetInfos {
   if (v.type = &quot;page&quot; &amp;&amp; v.url = url1) {
      targetId := v.targetId
      break
   }
}
MsgBox, Сейчас страница ВКонтакте будет закрыта
Page.Call(&quot;Target.closeTarget&quot;, {targetId: targetId, success: true})</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sun, 05 Sep 2021 17:47:36 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149477#p149477</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Через chrome.ahk получить список вкладок и закрыть по условию?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=149475#p149475</link>
			<description><![CDATA[<p>Добрый вечер.<br />Хочу в хроме реализовать подметалку лишних вкладок по условию.<br />Т.е. чтобы при нажатии кнопки гуя, выполнялись следующие действия:<br />1) <em>получить список url&#039;ов открытых вкладок.</em> вроде как разобрался через getpagelist и потом loop из getpage(значение из листа).<br />2) Может ли chrome.ahk закрывать вкладки? Или, может быть, как то можно переместить вкладку в отдельное окно? И потом, просто ahk это окно закрыть?</p><p>Енто по идее можно удалить, я решил проблему совсем другим способом.</p>]]></description>
			<author><![CDATA[null@example.com (Gh0sTG0)]]></author>
			<pubDate>Sat, 04 Sep 2021 23:13:47 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=149475#p149475</guid>
		</item>
	</channel>
</rss>
