<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Окрашивание слова в определенный цвет]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=15573&amp;type=atom" />
	<updated>2020-08-06T15:57:17Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15573</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Окрашивание слова в определенный цвет]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141502#p141502" />
			<content type="html"><![CDATA[<p>teadrinker, Благодарю.<br />Теперь все нормально.</p>]]></content>
			<author>
				<name><![CDATA[kornerupin]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41010</uri>
			</author>
			<updated>2020-08-06T15:57:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141502#p141502</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Окрашивание слова в определенный цвет]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141481#p141481" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>#If WinActive(&quot;ahk_class OpusApp&quot;)
:*b0:программа1::
   try Word := ComObjActive(&quot;Word.Application&quot;)
   catch
      throw &quot;Failed to get Word Application object&quot;
   RegExMatch(A_ThisHotkey, &quot;O)[^:]+$&quot;, m)
   Sel := Word.Selection
   end := Sel.Start
   Rng := Word.ActiveDocument.Range(end - m.Len, end)
   Rng.Font.ColorIndex := wdBlue := 2
   Sel.Font.ColorIndex := wdBlack := 1
   Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-08-05T21:44:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141481#p141481</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Окрашивание слова в определенный цвет]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141478#p141478" />
			<content type="html"><![CDATA[<p>А вот в коде для ворда - там после окраски ключевого слова - можно как-нибудь цвет сделать обычным черным ?<br />Потому что ворд - так и продолжает печатать синим цветом.</p>]]></content>
			<author>
				<name><![CDATA[kornerupin]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41010</uri>
			</author>
			<updated>2020-08-05T20:24:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141478#p141478</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Окрашивание слова в определенный цвет]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141477#p141477" />
			<content type="html"><![CDATA[<p>По Экселю не разбирался. Дерзайте: <a href="https://www.autohotkey.com/boards/viewtopic.php?p=495&amp;sid=523b841513946e58348eb636190d8c00#p495">1</a>, <a href="https://docs.microsoft.com/en-us/office/vba/api/overview/excel">2</a>.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-08-05T20:04:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141477#p141477</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Окрашивание слова в определенный цвет]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141473#p141473" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong> А как для экселя это применить ?</p><p>Я вот так записал - не работает.<br /></p><div class="codebox"><pre><code>#If WinActive(&quot;ahk_class XLMAIN&quot;)
:*b0:программа1::
   try Excel := ComObjActive(&quot;Excel.Application&quot;)
   catch
      throw &quot;Failed to get Excel Application object&quot;
   RegExMatch(A_ThisHotkey, &quot;O)[^:]+$&quot;, m)
   end := Excel.Selection.Start
   Rng := Excel.Activesheets.Range(end - m.Len, end)
   Rng.Font.ColorIndex := wdBlue := 2
   Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[kornerupin]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41010</uri>
			</author>
			<updated>2020-08-05T16:18:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141473#p141473</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Окрашивание слова в определенный цвет]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141467#p141467" />
			<content type="html"><![CDATA[<p>Для Ворда так примерно:<br /></p><div class="codebox"><pre><code>#If WinActive(&quot;ahk_class OpusApp&quot;)
:*b0:программа1::
   try Word := ComObjActive(&quot;Word.Application&quot;)
   catch
      throw &quot;Failed to get Word Application object&quot;
   RegExMatch(A_ThisHotkey, &quot;O)[^:]+$&quot;, m)
   end := Word.Selection.Start
   Rng := Word.ActiveDocument.Range(end - m.Len, end)
   Rng.Font.ColorIndex := wdBlue := 2
   Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-08-05T07:40:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141467#p141467</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Окрашивание слова в определенный цвет]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141465#p141465" />
			<content type="html"><![CDATA[<p>teadrinker, мне там нужно всего три слова.</p>]]></content>
			<author>
				<name><![CDATA[kornerupin]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41010</uri>
			</author>
			<updated>2020-08-05T03:51:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141465#p141465</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Окрашивание слова в определенный цвет]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141464#p141464" />
			<content type="html"><![CDATA[<p>То-есть, все слова, которые нужно окрашивать, нужно будет прописать в скрипте? А если какое-то другое понадобится?<br />Бросьте, вручную проще. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-08-05T01:03:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141464#p141464</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Окрашивание слова в определенный цвет]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141463#p141463" />
			<content type="html"><![CDATA[<p>Здравствуйте.<br />Есть скрипт который при последовательном нажатии клавиш - запускает скрипт.<br />А само набранное слово при этом стирает.</p><p>Как изменить этот скрипт, чтобы он не стирал слово, а вместо запуска скрипта - окрашивал бы данное слово в синий цвет ?<br />Разумеется если набрать в блокноте это слово - то он ничего не покрасит, но вот если его набирать в ворде или экселе - то да.</p><div class="codebox"><pre><code>
:*:программа1:: 
Sleep, 500
   Run C:\1\tada.wav
   Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[kornerupin]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41010</uri>
			</author>
			<updated>2020-08-05T00:25:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141463#p141463</id>
		</entry>
</feed>
