<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=16126&amp;type=atom" />
	<updated>2021-02-26T10:57:36Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16126</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146523#p146523" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Да понял тебя.</p>]]></content>
			<author>
				<name><![CDATA[edea28_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41481</uri>
			</author>
			<updated>2021-02-26T10:57:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146523#p146523</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146522#p146522" />
			<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-02-26T10:56:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146522#p146522</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146521#p146521" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Блин, а как?(</p>]]></content>
			<author>
				<name><![CDATA[edea28_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41481</uri>
			</author>
			<updated>2021-02-26T10:44:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146521#p146521</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146520#p146520" />
			<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-02-26T10:33:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146520#p146520</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146519#p146519" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Как то так?<br /></p><div class="codebox"><pre><code>
StringReplace, ClipBoard, ClipBoard, StrReplace(&quot;,&quot;),;, All 
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[edea28_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41481</uri>
			</author>
			<updated>2021-02-26T10:30:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146519#p146519</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146518#p146518" />
			<content type="html"><![CDATA[<p>Запятую можно экранировать знаком акцента: `,<br />Лучше использовать StrReplace(), все литералы в кавычках.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-02-26T10:23:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146518#p146518</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146517#p146517" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Спасибо огромное!<br />У меня еще один маленький вопрос.</p><br /><p>StringReplace, ClipBoard, ClipBoard, <strong><span style="color: red">.</span></strong>,;, All<br />StringReplace, ClipBoard, ClipBoard, <strong><span style="color: red">,</span></strong>,;, All<br />Это скрипт меняет точку&quot;.&quot; на точку с запятой &quot;;&quot;<br />Но запятую &quot;,&quot; на точку с запятой &quot;;&quot; ведают ошибку при запуске.<br />Можно как то подправить ?</p>]]></content>
			<author>
				<name><![CDATA[edea28_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41481</uri>
			</author>
			<updated>2021-02-26T10:18:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146517#p146517</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146516#p146516" />
			<content type="html"><![CDATA[<p>Литеральные кавычки нужно удваивать:<br /></p><div class="codebox"><pre><code>RegExReplace(Clipboard, &quot;s)&lt;table border=&quot;&quot;2&quot;&quot;&gt;.*?&lt;/table&gt;\R?&quot;)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-02-26T09:58:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146516#p146516</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146515#p146515" />
			<content type="html"><![CDATA[<p>Исправил это так.<br /></p><div class="codebox"><pre><code>
^vkA4::
SetBatchLines, -1
ClipBoard =
SendInput, ^{vk41}^{vk43}    ;  ctrl+A crl+C
ClipWait, 2
if ErrorLevel
{
   MsgBox, Буфер обмена пуст!
   Return
 }   
StringReplace, ClipBoard, ClipBoard, &lt;table border=&quot;2&quot;&gt;,&lt;tablez&gt;, All 
MyVar = %clipboard%
Clipboard := RegExReplace(Clipboard, &quot;s)&lt;tablez&gt;.*?&lt;/table&gt;\R?&quot;)
SendInput, ^{vk56}     ;  ctrl+V
return

</code></pre></div>]]></content>
			<author>
				<name><![CDATA[edea28_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41481</uri>
			</author>
			<updated>2021-02-26T09:35:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146515#p146515</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146514#p146514" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Получилось все! Но я попробовал поменять тег</p><p>&lt;table&gt;&lt;/table&gt;<br />на<br />&lt;table border=<strong>&quot;2&quot;</strong>&gt; &lt;/table&gt; <br />И мне выдает ошибку и ругается про двойку и &quot;&quot;<br />Можно это исправить?</p><br /><div class="codebox"><pre><code> 
vk9::
SetBatchLines, -1
ClipBoard =
SendInput, ^{vk41}^{vk43}    ;  ctrl+A crl+C
ClipWait, 2
if ErrorLevel
{
   MsgBox, Буфер обмена пуст!
   Return
 }   
MyVar = %clipboard%
Clipboard := RegExReplace(Clipboard, &quot;s)&lt;table border=&quot;2&quot;&gt;.*?&lt;/table&gt;\R?&quot;)
SendInput, ^{vk56}     ;  ctrl+V
return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[edea28_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41481</uri>
			</author>
			<updated>2021-02-26T08:29:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146514#p146514</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146513#p146513" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>edea28_ пишет:</cite><blockquote><p>Что тут надо исправить</p></blockquote></div><div class="quotebox"><cite>edea28_ пишет:</cite><blockquote><div class="codebox"><pre><code>RegExReplace(%Clipboard%, &quot;(&lt;table&gt;)(.*)(&lt;/table&gt;)&quot;)</code></pre></div></blockquote></div><div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><div class="codebox"><pre><code>RegExReplace(html, &quot;s)&lt;table&gt;.*?&lt;/table&gt;\R?&quot;)</code></pre></div></blockquote></div><p>Вопрос, что тут надо исправить. (?)</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-02-26T08:24:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146513#p146513</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146512#p146512" />
			<content type="html"><![CDATA[<p>Что тут надо исправить чтоб RegExReplace понимал что я вставлю текст из буфера обмена. А потом исправленный текст вставлял обратно.<br /></p><div class="codebox"><pre><code>
vk9::      
MyVar = %Clipboard%
OutputVar := RegExReplace(%Clipboard%, &quot;(&lt;table&gt;)(.*)(&lt;/table&gt;)&quot;)
MsgBox, %OutputVar%
return</code></pre></div><br /><p>Скрипт с авто копированием текста.<br /></p><div class="codebox"><pre><code>
vk9::
SetBatchLines, -1
ClipBoard =
SendInput, ^{vk41}^{vk43}    ;  ctrl+A crl+C
ClipWait, 2
if ErrorLevel
{
   MsgBox, Буфер обмена пуст!
   Return
 }   
MyVar = %Clipboard%
OutputVar := RegExReplace(%Clipboard%, &quot;(&lt;table&gt;)(.*)(&lt;/table&gt;)&quot;)
MsgBox, %OutputVar%
return

</code></pre></div>]]></content>
			<author>
				<name><![CDATA[edea28_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41481</uri>
			</author>
			<updated>2021-02-26T06:18:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146512#p146512</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146509#p146509" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>edea28_ пишет:</cite><blockquote><p>И я не совсем понял зачем кусок html кода использовать в скрипте</p></blockquote></div><p>Только для того, чтобы показать, что регулярка работает правильно. По сути решение — только эта часть:<br /></p><div class="codebox"><pre><code>RegExReplace(html, &quot;s)&lt;table&gt;.*?&lt;/table&gt;\R?&quot;)</code></pre></div><p>которая решает задачу удаления всего лишнего. Ваша задача теперь только вставить результат.</p><div class="quotebox"><cite>edea28_ пишет:</cite><blockquote><p>У меня вообще нету вариантов как реализовать и доделать.</p></blockquote></div><p>Это форум для тех, кто интересуется программированием, если что. Обычно такие люди и Гуглом умеют пользоваться. Попробуйте запрос «ahk вставить текст».</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-02-25T21:03:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146509#p146509</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146508#p146508" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />У меня вообще нету вариантов как реализовать и доделать.<br />И я не совсем понял зачем кусок html кода использовать в скрипте</p>]]></content>
			<author>
				<name><![CDATA[edea28_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41481</uri>
			</author>
			<updated>2021-02-25T20:58:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146508#p146508</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прошу помощи в написание скрипта для HTML правки <тегов>]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146507#p146507" />
			<content type="html"><![CDATA[<p>Правильно так:<br /></p><div class="codebox"><pre><code>html =
(
 &lt;div&gt;        &lt;/div&gt;
&lt;h4&gt;Характеристики:&lt;/h4&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Артикул&lt;/td&gt;
&lt;td&gt;EA07.003.001&lt;/td&gt;
&lt;tr&gt;
&lt;td&gt;Напряжение питания&lt;/td&gt;
&lt;td&gt;230 В; 50 Гц или 24 В АС/DC&lt;/td&gt;
&lt;/table&gt;
Блабла по теме дальше.
)
MsgBox, % RegExReplace(html, &quot;s)&lt;table&gt;.*?&lt;/table&gt;\R?&quot;)</code></pre></div><p>Как вставить в свой, подумайте сами.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-02-25T20:48:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146507#p146507</id>
		</entry>
</feed>
