<?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=13906&amp;type=atom" />
	<updated>2018-07-02T20:15:54Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13906</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Цвет текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126635#p126635" />
			<content type="html"><![CDATA[<p>У меня тоже в порядке FF 61.0.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-07-02T20:15:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126635#p126635</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Цвет текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126634#p126634" />
			<content type="html"><![CDATA[<p>Windows 7 SP1, FF 52.7.2 (64-бит). <img src="//forum.script-coding.com/img/smilies/hmm.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2018-07-02T20:03:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126634#p126634</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Цвет текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126631#p126631" />
			<content type="html"><![CDATA[<p>У меня в 7 соответствует, по крайней мере в FF.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-07-02T19:41:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126631#p126631</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Цвет текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126626#p126626" />
			<content type="html"><![CDATA[<p>OFF: В 7ом сообщении жму кнопку &quot;Копировать код&quot; около нижнего кода, а копируется верхний. А, например, <a href="http://forum.script-coding.com/viewtopic.php?pid=99235#p99235">в этом сообщении</a> каждая кнопка копирования соответствует своему коду. В чём подвох?</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2018-07-02T18:23:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126626#p126626</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Цвет текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126624#p126624" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>А, забыл, ещё можно через ActiveX-control htmlfile:</p></blockquote></div><p>Спасибо большое&nbsp; есть над чем подумать и разобраться.=)</p>]]></content>
			<author>
				<name><![CDATA[RedBishep]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38892</uri>
			</author>
			<updated>2018-07-02T16:24:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126624#p126624</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Цвет текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126623#p126623" />
			<content type="html"><![CDATA[<p>А, забыл, ещё можно через ActiveX-control htmlfile:<br /></p><div class="codebox"><pre><code>html =
(
&lt;style&gt;
   .red {
      color: &#039;red&#039;;
   }
   .lime {
      color: &#039;lime&#039;;
   }
&lt;/style&gt;
&lt;body&gt;
   &lt;span class=&quot;red&quot;&gt;22222222222&lt;br&gt;
   2222222&lt;br&gt;&lt;/span&gt;
   &lt;span class=&quot;lime&quot;&gt;5555555555&lt;br&gt;
   5555&lt;br&gt;
   55555&lt;br&gt;
   55555555&lt;br&gt;
   555555&lt;br&gt;&lt;/span&gt;
   &lt;span class=&quot;red&quot;&gt;222222222&lt;br&gt;
   22222222222&lt;/span&gt;
&lt;/body&gt;
)

Gui, Margin, 0, 0
Gui, Add, ActiveX, vText w475 h400, htmlfile
Text.write(html)
Gui, Show
Return

GuiClose:
   ExitApp</code></pre></div><p>C ListView пример есть, но не мой, я не разбирался:<br /></p><div class="codebox"><pre><code>#SingleInstance,Force
Gui, +LastFound
Gui, Add, ListView, x5 y5 w200 h200 vLV_Sample hwndlv,Номер|День
lv:=new ListView(lv)
LV.Add(&quot;&quot;,1,&quot;Понедельник&quot;)
LV.Add(&quot;&quot;,2,&quot;Вторник&quot;)
LV.Add(&quot;&quot;,3,&quot;Среда&quot;)
LV.Add(&quot;&quot;,4,&quot;Четверг&quot;)
LV.Add(&quot;&quot;,5,&quot;Пятница&quot;)
LV.Add(&quot;&quot;,6,&quot;Субота&quot;)
LV.Add(&quot;&quot;,7,&quot;Воскресенье&quot;)
Gui,Show, w210 h210

lv.Color(1,0xA8FFFF,0xC030FF)

lv.Color(3,0xA8FFFF,0xA8FF84)

WinSet,Redraw,,A
Return 
GuiClose:
GuiEscape:
Exitapp
class ListView{
    static list:=[]
    __New(hwnd){
        this.list[hwnd]:=this
        OnMessage(0x4e,&quot;WM_NOTIFY&quot;)
        this.hwnd:=hwnd
        this.control:=[]
    }
    add(options,items*){
        Gui,ListView,% this.hwnd
        for a,b in items{
            if A_Index=1
                item:=LV_Add(options,b)
            Else
                LV_Modify(item,&quot;col&quot; A_Index,b)
        }
    }
    clear(){
        this.control:=[]
    }
    Color(item,fore=&quot;&quot;,back=&quot;&quot;){
        LV_GetText(text,item)
        if fore!=&quot;&quot;
            this.Control[text,&quot;fore&quot;]:=fore
        if Back!=&quot;&quot;
            this.Control[text,&quot;back&quot;]:=back
    }
}
WM_NOTIFY(Param*){
    Critical
    if (this:=ListView.list[NumGet(Param.2)])&amp;&amp;(NumGet(Param.2,2*A_PtrSize,&quot;int&quot;)=-12){
        stage:=NumGet(Param.2,3*A_PtrSize,&quot;uint&quot;)
        if (stage=1)
            return 0x20 ;sets CDRF_NOTIFYITEMDRAW
        if (stage=0x10001){ ;NM_CUSTOMDRAW &amp;&amp; Control is in the list
            index:=numget(Param.2,A_PtrSize=4?9*A_PtrSize:7*A_PtrSize,&quot;uint&quot;)
            LV_GetText(text,index+1)
            info:=this.Control[text]
            if info.fore!=&quot;&quot;
                NumPut(info.fore,Param.2,A_PtrSize=4?12*A_PtrSize:10*A_PtrSize,&quot;int&quot;) ;sets the foreground
            if info.back!=&quot;&quot;
                NumPut(info.back,Param.2,A_PtrSize=4?13*A_PtrSize:10.5*A_PtrSize,&quot;int&quot;) ;sets the background
        }
    }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-07-02T16:16:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126623#p126623</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Цвет текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126622#p126622" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>В зависимости от цели можно использовать ListView, в нём путём некоторых ухищрений можно раскрасить строки разным цветом.</p></blockquote></div><p>Если можно пример\шаблон привидите с &quot;ListView&quot;&nbsp; как это сделать правильно в моей ситуации.</p>]]></content>
			<author>
				<name><![CDATA[RedBishep]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38892</uri>
			</author>
			<updated>2018-07-02T16:02:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126622#p126622</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Цвет текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126621#p126621" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Можно использовать RichEdit, но он нативно в AHK не поддерживается, им придётся управлять через DllCall или com-объекты.</p></blockquote></div><p>Вот это: <a href="https://autohotkey.com/board/topic/17869-crichedit-standard-richedit-control-for-autohotkey-scripts/">cRichEdit - Standard RichEdit control for AutoHotkey scripts - Scripts and Functions - AutoHotkey Community</a>, это: <a href="https://github.com/AHK-just-me/Class_RichEdit">GitHub - AHK-just-me/Class_RichEdit: AHK RichEdit Control</a>, это: <a href="https://github.com/dufferzafar/Autohotkey-Scripts/blob/master/lib/RichEdit.ahk">Autohotkey-Scripts/RichEdit.ahk at master · dufferzafar/Autohotkey-Scripts · GitHub</a> в качестве враппера не подойдёт?</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2018-07-02T15:59:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126621#p126621</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Цвет текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126620#p126620" />
			<content type="html"><![CDATA[<p>Так у вас заголовок о прокрутке, а вопрос о цвете. Не логичнее ли было бы назвать как-нибудь &quot;изменение цвета части текста в Edit&quot;?</p><p>В Edit никак. Можно использовать RichEdit, но он нативно в AHK не поддерживается, им придётся управлять через DllCall или com-объекты.<br />В зависимости от цели можно использовать ListView, в нём путём некоторых ухищрений можно раскрасить строки разным цветом.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-07-02T15:46:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126620#p126620</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Цвет текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126619#p126619" />
			<content type="html"><![CDATA[<p>Ммм. извиняюсь если не понятно объяснил..попробую более подробно.</p><p>Я сделал прокрутку текста в окошке &quot;Edit&quot;.<br />Т.е. сколько хочешь можешь туда писать текста он &quot;наверное&quot; весь поместиться.. и можешь прокручивать его вниз вверх и читать а окошко само остаётся маленьким не занимает весь экран.<br />А вопрос.. как сделать отдельные части текста цветным.. пол текста красным например а остальную часть зелёную.</p><p>Или есть&nbsp; другая альтернатива, о которой я незнаю.</p>]]></content>
			<author>
				<name><![CDATA[RedBishep]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38892</uri>
			</author>
			<updated>2018-07-02T15:28:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126619#p126619</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Цвет текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126618#p126618" />
			<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-07-02T15:05:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126618#p126618</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Цвет текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126615#p126615" />
			<content type="html"><![CDATA[<p>Доброго времени суток.<br />Посоветуйте решение.</p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>
#SingleInstance force

Gui, Add, edit, x140 y140 r5 w200 h200 ReadOnly ,
(
22222222222
2222222
5555555555
5555
55555
55555555
555555
222222222
22222222222
)


Gui, Show, Center w475 h400, New GUI Window
Return

GuiClose:
ExitApp

</code></pre></div></div></div><p>Прокрутку текста сделал через &quot;Edit&quot;<br />Но есть проблема,нужно что бы&nbsp; &quot;2&quot; был красного цвета а &quot;5&quot; зеленого или любого другого цвета без разницы.<br />Через &quot;Font&quot; не получилось он захватывает весь текст, или я что-то не правильно делаю.</p><p>Помогите это реализовать,или возможно есть альтернатива &quot;Edit&quot;.</p><p>Заранее благодарен.</p>]]></content>
			<author>
				<name><![CDATA[RedBishep]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38892</uri>
			</author>
			<updated>2018-07-02T14:20:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126615#p126615</id>
		</entry>
</feed>
