<?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=16695&amp;type=atom" />
	<updated>2021-11-01T10:22:32Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16695</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как определить возможность перейти назад chrome.ahk]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150359#p150359" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>По идее так, не проверял:<br /></p><div class="codebox"><pre><code>obj := PageInst.Call(&quot;Page.getNavigationHistory&quot;, {})
MsgBox, % obj.currentIndex</code></pre></div></blockquote></div><p>Нужно еще потестировать, но на данный момент оно работает. Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[Gh0sTG0]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39523</uri>
			</author>
			<updated>2021-11-01T10:22:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150359#p150359</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как определить возможность перейти назад chrome.ahk]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150348#p150348" />
			<content type="html"><![CDATA[<p>Тип можно, но на сходство.<br />Можно конечно с регуляркой помудрить, но имхо легче добавить новый метод несовпадения.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-10-31T22:09:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150348#p150348</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как определить возможность перейти назад chrome.ahk]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150347#p150347" />
			<content type="html"><![CDATA[<p>А я уж подумал, ты исходный код браузера предлагаешь менять. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /></p><div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>Если мы используем GetPage(), то подключаемся только к type=page.</p></blockquote></div><p>Я давно не пользовался, но там же можно тип указать?<br />Но если нужны дополнительные условия, то поменять код, конечно, не проблема. Я его дополнял наверно каждый раз, когда использовал для реальных проектов.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-10-31T20:12:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150347#p150347</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как определить возможность перейти назад chrome.ahk]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150346#p150346" />
			<content type="html"><![CDATA[<p>При переключении вкладки нам надо к ней подключаться.<br />Если мы используем GetPage(), то подключаемся только к type=page.<br /></p><div class="codebox"><pre><code>GetPage(Index:=1, Type:=&quot;page&quot;, fnCallback:=&quot;&quot;)
{
   return this.GetPageBy(&quot;type&quot;, Type, &quot;exact&quot;, Index, fnCallback)
}</code></pre></div><p>А вкладки могут быть разных типов, к тому же типы iframe не возвращают нужное значение.<br />Поэтому, я добавил такую функцию:<br /></p><div class="codebox"><pre><code>GetPage1(Index:=1, Type:=&quot;iframe&quot;, fnCallback:=&quot;&quot;)
{
   return this.GetPageBy(&quot;type&quot;, Type, &quot;not&quot;, Index, fnCallback)
}</code></pre></div><p>И добавил условие в эту функцию:<br /></p><div class="codebox"><pre><code>   GetPageBy(Key, Value, MatchMode:=&quot;exact&quot;, Index:=1, fnCallback:=&quot;&quot;)
   {
      Count := 0
      for n, PageData in this.GetPageList()
      {
         if (((MatchMode = &quot;exact&quot; &amp;&amp; PageData[Key] = Value) ; Case insensitive
            || (MatchMode = &quot;not&quot; &amp;&amp; PageData[Key] != Value)
            || (MatchMode = &quot;contains&quot; &amp;&amp; InStr(PageData[Key], Value))
            || (MatchMode = &quot;startswith&quot; &amp;&amp; InStr(PageData[Key], Value) == 1)
            || (MatchMode = &quot;regex&quot; &amp;&amp; PageData[Key] ~= Value))
            &amp;&amp; ++Count == Index)
            return new this.Page(PageData.webSocketDebuggerUrl, fnCallback)
      }
   }</code></pre></div><p>Тестировал на опере, вроде работает.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-10-31T19:56:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150346#p150346</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как определить возможность перейти назад chrome.ahk]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150344#p150344" />
			<content type="html"><![CDATA[<p>Если только для этой цели, то да.<br /></p><div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>Если переключаться по вкладкам, то исходный код хрома придется редактировать.</p></blockquote></div><p>Этого не понял.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-10-31T19:48:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150344#p150344</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как определить возможность перейти назад chrome.ahk]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150341#p150341" />
			<content type="html"><![CDATA[<p>Если переключаться по вкладкам, то исходный код хрома придется редактировать.<br />ИМХО если chrome.ahk нужен только для этой цели, то через iaccessible проще и надежней.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-10-31T19:21:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150341#p150341</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как определить возможность перейти назад chrome.ahk]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150338#p150338" />
			<content type="html"><![CDATA[<p>Подредактировал.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-10-31T14:48:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150338#p150338</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как определить возможность перейти назад chrome.ahk]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150337#p150337" />
			<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>2021-10-31T14:46:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150337#p150337</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как определить возможность перейти назад chrome.ahk]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150336#p150336" />
			<content type="html"><![CDATA[<p>По идее так, не проверял:<br /></p><div class="codebox"><pre><code>obj := PageInst.Call(&quot;Page.getNavigationHistory&quot;, {})
MsgBox, % obj.currentIndex</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-10-31T14:38:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150336#p150336</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как определить возможность перейти назад chrome.ahk]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150335#p150335" />
			<content type="html"><![CDATA[<p>А, да, js всё время возвращает всё количество.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-10-31T14:35:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150335#p150335</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как определить возможность перейти назад chrome.ahk]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150334#p150334" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br /></p><div class="codebox"><pre><code>Цикл:
	Если возможно перейти назад:
			перейти.
	Иначе:
			выйти из цикла.</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Gh0sTG0]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39523</uri>
			</author>
			<updated>2021-10-31T14:32:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150334#p150334</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как определить возможность перейти назад chrome.ahk]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150333#p150333" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>А зачем состояние кнопки?</p></blockquote></div><div class="quotebox"><cite>Gh0sTG0 пишет:</cite><blockquote><p>Возможно ли как то определить - возможно ли сделать переход на страницу назад?</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-10-31T14:31:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150333#p150333</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как определить возможность перейти назад chrome.ahk]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150332#p150332" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong> Проверил, да. Действительно, оно возвращает видимо размер полной цепочки, и &quot;слева&quot; и &quot;справа&quot;. Осталось понять как из ахк отправлять ту первую штуку.</p>]]></content>
			<author>
				<name><![CDATA[Gh0sTG0]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39523</uri>
			</author>
			<updated>2021-10-31T14:31:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150332#p150332</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как определить возможность перейти назад chrome.ahk]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150331#p150331" />
			<content type="html"><![CDATA[<p>А зачем состояние кнопки?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-10-31T14:31:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150331#p150331</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как определить возможность перейти назад chrome.ahk]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150330#p150330" />
			<content type="html"><![CDATA[<p>Через джаваскрипт точно не то, так как он не возвратит состояние кнопки назад.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-10-31T14:29:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150330#p150330</id>
		</entry>
</feed>
