<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: chrome.ahk как сделать цикл с PageInst.Evaluate?]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14324&amp;type=atom" />
	<updated>2018-11-15T11:53:00Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=14324</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: chrome.ahk как сделать цикл с PageInst.Evaluate?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129819#p129819" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong> Нашел, узрел &quot;перед точкой и после нее необходимо оставлять пробелы&quot;, ушел просвещаться. Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[Gh0sTG0]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39523</uri>
			</author>
			<updated>2018-11-15T11:53:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129819#p129819</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: chrome.ahk как сделать цикл с PageInst.Evaluate?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129817#p129817" />
			<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>2018-11-15T11:39:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129817#p129817</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: chrome.ahk как сделать цикл с PageInst.Evaluate?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129816#p129816" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Признаюсь, я дурак. Но как же не хватает какого то базового учебника по ahk... Я пробовал ставить .Nom. без пробелов до и после...</p>]]></content>
			<author>
				<name><![CDATA[Gh0sTG0]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39523</uri>
			</author>
			<updated>2018-11-15T11:20:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129816#p129816</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: chrome.ahk как сделать цикл с PageInst.Evaluate?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129814#p129814" />
			<content type="html"><![CDATA[<p><strong>Gh0sTG0</strong>, рукалицо.jpeg. Берётесь за высшую математику, не изучив элементарной арифметики. Причём тут Хром вообще? Вам надо понять, как добавить переменную в строку.<br />Догадайтесь, как в примере ниже вместо второго var получить значение переменной var:<br /></p><div class="codebox"><pre><code>var := &quot;test&quot;
MsgBox, % &quot;Content of var = var. I did it!&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-15T10:22:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129814#p129814</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: chrome.ahk как сделать цикл с PageInst.Evaluate?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129812#p129812" />
			<content type="html"><![CDATA[<p>Осваиваю замечательную штуку для хрома chrome.ahk<br />Уже научился в целом работать, очень сильно облегчает жизнь.<br />Но столкнулся с проблемой:<br /></p><div class="codebox"><pre><code>	PageInst := Chrome.GetPage(1)
	numEl := PageInst.Evaluate(&quot;document.getElementsByClassName(&#039;ClassName&#039;).length;&quot;).Value
	Loop %numEl%
	{
		No := A_Index
		No -= 1
		El := PageInst.Evaluate(&quot;document.getElementsByClassName(&#039;ClassName&#039;)[No].href;&quot;).Value
		MsgBox, % El
	}</code></pre></div><p>Если сделать MsgBox % numEl то он отдаст число ~25 +- для разных страниц. Но вот та строка </p><div class="codebox"><pre><code>PageInst.Evaluate(&quot;document.getElementsByClassName(&#039;ClassName&#039;)[No].href;&quot;).Value</code></pre></div><p> упорно отправляет No как текст, а не как значение. %No% дает тот же результат. &quot;No&quot; дает &quot;ошибка запуска скрипта, ожидается ;, а не &quot;.<br />Кто то в курсе, как Evaluate&#039;у давать значения переменных?</p>]]></content>
			<author>
				<name><![CDATA[Gh0sTG0]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39523</uri>
			</author>
			<updated>2018-11-15T10:08:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129812#p129812</id>
		</entry>
</feed>
