<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Загрузка базы в ListView]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=6142</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=6142&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Загрузка базы в ListView».]]></description>
		<lastBuildDate>Wed, 04 Apr 2012 22:30:10 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=58843#p58843</link>
			<description><![CDATA[<div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>Основная трудность в том, что каждый раз изменяется количество параметров (parameter_...). Здесь их пять, а в следующий раз их может быть десять, сто и т. д. Нужно, чтобы программа динамически корректировала команду <em><strong>LV_Add</strong></em>.</p></blockquote></div><p>Если я правильно понял, то нужно просто через строку параметры передавать. Пример:<br /></p><div class="codebox"><pre><code>AddRow(Data, Delimiters=&quot;,&quot;)
{
   CurColCount := LV_GetCount(&quot;Column&quot;)
   LV_Add(&quot;&quot;)
   CurRowCount := LV_GetCount()
   Loop, parse, Data, %Delimiters%
   {
	  if(A_Index&gt;CurColCount)
	     LV_InsertCol(A_Index, &quot;&quot;, &quot;column_&quot; . A_Index)
	  LV_Modify(CurRowCount, &quot;Col&quot; . A_Index, A_LoopField)
   }
   LV_ModifyCol()
   return
}

Gui, Add, ListView, r10 w480 , one|two
Gui, Show
AddRow(&quot;раз,два,три,четыре&quot;)
AddRow(&quot;раз,два,три,четыре,пять,шесть&quot;)
AddRow(&quot;раз;два;три;четыре;пять;шесть;семь;восемь&quot;, &quot;;&quot;)
return

Esc::
GuiClose:
ExitApp</code></pre></div><p>Тут функция AddRow добавляет строку в текущий ListView, принимая параметры в виде текстовой строки. Разделитель параметров передаётся во втором параметре, по-умолчанию используется запятая. Ну и разумеется через WinApi можно и будет в разы быстрее <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />.</p>]]></description>
			<author><![CDATA[null@example.com (Александр_)]]></author>
			<pubDate>Wed, 04 Apr 2012 22:30:10 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=58843#p58843</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=58839#p58839</link>
			<description><![CDATA[<p>Нет, на практике такого не предвидится (разве что при ошибке пользователя). Просто хотелось узнать, вдруг всё уже придумано до нас. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />Если число параметров (колонок) превысит 20, программа спросит: &quot;Число колонок превышает 20. Продолжить? [Да] / [Нет]&quot;.<br />Если число параметров (колонок) дойдёт до 200, программа скажет: &quot;Достигнут предел 200 колонок&quot;.<br />В документации говорится, что для ListView ограничение 200 колонок. Я прописал команду на 200 параметров. Когда закончу, посмотрю, как это влияет на производительность.</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Wed, 04 Apr 2012 15:46:09 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=58839#p58839</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=58797#p58797</link>
			<description><![CDATA[<p><strong>ypppu</strong><br />Видимо, либо создавать текст скрипта динамически, писать во временный файл и запускать, либо работать с ListView через API. Может, всё-таки проще прописать параметров с запасом? 100 колонок — это абсурд какой-то, по-моему. Что, реально может быть так много?</p>]]></description>
			<author><![CDATA[null@example.com (YMP)]]></author>
			<pubDate>Wed, 04 Apr 2012 02:39:20 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=58797#p58797</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=58790#p58790</link>
			<description><![CDATA[<p>Имеется вопрос, очень близкий по названию к теме.</p><p>Нужно взять данные из базы (массива данных) и создать в GUI элемент ListView. Массив имеет вид:<br />parameter_1 = nsdfseioprj<br />parameter_2 = baglkjfdnsb<br />parameter_3 = gsjrgsljgjsd<br />parameter_4 = ndsjfgnldfgl<br />parameter_5 = dfdfsgidifog</p><p>Известно количество столбцов в ListView и их имена .<br />Содержимое строк соответствует значению переменных <em>parameter_1</em>, <em>parameter_2</em> и так далее. Число параметров известно.<br />Требуется добавлять в элемент ListView строки. Согласно справке, это делается при помощи функции для строк <strong>LV_Add([Options, Field1, Field2, ...])</strong>. В данном отдельно взятом случае это будет выглядеть так:</p><div class="codebox"><pre><code>LV_Add( , parameter_1, parameter_2, parameter_3, parameter_4, parameter_5)</code></pre></div><p>Основная трудность в том, что каждый раз изменяется количество параметров (parameter_...). Здесь их пять, а в следующий раз их может быть десять, сто и т. д. Нужно, чтобы программа динамически корректировала команду <em><strong>LV_Add</strong></em>.</p><p>Конечно, можно заранее написать длиннющую строку </p><div class="codebox"><pre><code>LV_Add( , parameter_1, parameter_2, parameter_3, parameter_4, parameter_5 и так далее до parameter_100500) ; чтобы точно хватило</code></pre></div><p>Но это как-то не правильно. <img src="//forum.script-coding.com/img/smilies/big_smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Tue, 03 Apr 2012 16:14:13 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=58790#p58790</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=50826#p50826</link>
			<description><![CDATA[<p>Как-нибудь так:<br /></p><div class="codebox"><pre><code>ButtonOK:
MyListView:
if (A_ThisLabel = &quot;MyListView&quot; &amp;&amp; A_GuiEvent != &quot;DoubleClick&quot;)
	Return
	
RowNumber := A_ThisLabel = &quot;ButtonOK&quot; ? LV_GetNext() : A_EventInfo
    LV_GetText(dog,RowNumber,1)
    LV_GetText(data3,RowNumber,2)
    LV_GetText(RequestDate,RowNumber,3) 
    LV_GetText(data1,RowNumber,4) 
    LV_GetText(rem,RowNumber,5) 
    LV_GetText(remont,RowNumber,6) 
    LV_GetText(Master,RowNumber,7) 
    LV_GetText(Disrepair3,RowNumber,8) 
    LV_GetText(asc,RowNumber,9) 
    LV_GetText(inj,RowNumber,10) 
    LV_GetText(kod1,RowNumber,11) 
    LV_GetText(lvl,RowNumber,12) 
    LV_GetText(kod2,RowNumber,13) 
    LV_GetText(kod3,RowNumber,14) 
    LV_GetText(kod4,RowNumber,15) 
    LV_GetText(ClientName,RowNumber,16) 
    LV_GetText(ClientAddress,RowNumber,17) 
    LV_GetText(PersonPhone,RowNumber,18) 
    LV_GetText(PhoneIMEI,RowNumber,19) 
    LV_GetText(ClientName1,RowNumber,20)
MsgBox  %dog% %data3% %data1% %rem% %Master%
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 23 Aug 2011 13:40:49 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=50826#p50826</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=50825#p50825</link>
			<description><![CDATA[<p>Вот получилось что-то похожее, но и так остались вопросы:(.<br /></p><div class="codebox"><pre><code>InputFile = D:\Input.txt
 
Items := &quot;№|data3|RequestDate|data1|rem|remont|Master|Disrepair3|asc|inj|kod1|lvl|kod2|kod3|&quot;
      . &quot;kod4|ClientName|ClientAddress|PersonPhone|PhoneIMEI|ClientName1&quot;

Gui, Add, Button, Hidden Default, OK
Gui, Add, ListView, r20 w700 gMyListView, % Items
 
StringReplace, Items1, Items, №, dog
 
FileRead, Text, %InputFile%
StartPos := 1
Loop
{
   StartPos := RegExMatch(Text, &quot;s)(^|\$End)(.*?)\$End&quot;, Found, StartPos) + 1  ; сдвигаем стартовую позицию
   if !Found2
      Break
 
   Loop, parse, Items1, |
   {
      RegExMatch(Found2, &quot;im`a)&quot; A_LoopField &quot;:[ \t]*(.*)$&quot;, Var)
      %A_LoopField% := Var1
   }
   LV_Add(&quot;&quot;, dog, data3, RequestDate, data1, rem, remont, Master, Disrepair3, asc, inj
            , kod1, lvl, kod2, kod3, kod4, ClientName, ClientAddress 
            , PersonPhone, PhoneIMEI, ClientName1)
}
 
Loop 17
   LV_ModifyCol(A_Index, &quot;AutoHdr&quot;)


Gui, Show,, New GUI Window2
return

ButtonOK:
RowNumber := LV_GetNext(0,F)
    LV_GetText(dog,RowNumber,1)
    LV_GetText(data3,RowNumber,2)
    LV_GetText(RequestDate,RowNumber,3) 
    LV_GetText(data1,RowNumber,4) 
    LV_GetText(rem,RowNumber,5) 
    LV_GetText(remont,RowNumber,6) 
    LV_GetText(Master,RowNumber,7) 
    LV_GetText(Disrepair3,RowNumber,8) 
    LV_GetText(asc,RowNumber,9) 
    LV_GetText(inj,RowNumber,10) 
    LV_GetText(kod1,RowNumber,11) 
    LV_GetText(lvl,RowNumber,12) 
    LV_GetText(kod2,RowNumber,13) 
    LV_GetText(kod3,RowNumber,14) 
    LV_GetText(kod4,RowNumber,15) 
    LV_GetText(ClientName,RowNumber,16) 
    LV_GetText(ClientAddress,RowNumber,17) 
    LV_GetText(PersonPhone,RowNumber,18) 
    LV_GetText(PhoneIMEI,RowNumber,19) 
    LV_GetText(ClientName1,RowNumber,20)
MsgBox  %dog% %data3% %data1% %rem% %Master%
return


GuiClose:
ExitApp


MyListView:
if A_GuiEvent = DoubleClick
{
    LV_GetText(dog,A_EventInfo,1)
    LV_GetText(data3,A_EventInfo,2)
    LV_GetText(RequestDate,A_EventInfo,3) 
    LV_GetText(data1,A_EventInfo,4) 
    LV_GetText(rem,A_EventInfo,5) 
    LV_GetText(remont,A_EventInfo,6) 
    LV_GetText(Master,A_EventInfo,7) 
    LV_GetText(Disrepair3,A_EventInfo,8) 
    LV_GetText(asc,A_EventInfo,9) 
    LV_GetText(inj,A_EventInfo,10) 
    LV_GetText(kod1,A_EventInfo,11) 
    LV_GetText(lvl,A_EventInfo,12) 
    LV_GetText(kod2,A_EventInfo,13) 
    LV_GetText(kod3,A_EventInfo,14) 
    LV_GetText(kod4,A_EventInfo,15) 
    LV_GetText(ClientName,A_EventInfo,16) 
    LV_GetText(ClientAddress,A_EventInfo,17) 
    LV_GetText(PersonPhone,A_EventInfo,18) 
    LV_GetText(PhoneIMEI,A_EventInfo,19) 
    LV_GetText(ClientName1,A_EventInfo,20)
    MsgBox  %dog% %data3% %data1% %rem% %Master%
}</code></pre></div><p>Можно ли как-то объединить<br /></p><div class="codebox"><pre><code>ButtonOK:
RowNumber := LV_GetNext(0,F)
    LV_GetText(dog,RowNumber,1)
    LV_GetText(data3,RowNumber,2)
    LV_GetText(RequestDate,RowNumber,3) 
    LV_GetText(data1,RowNumber,4) 
    LV_GetText(rem,RowNumber,5) 
    LV_GetText(remont,RowNumber,6) 
    LV_GetText(Master,RowNumber,7) 
    LV_GetText(Disrepair3,RowNumber,8) 
    LV_GetText(asc,RowNumber,9) 
    LV_GetText(inj,RowNumber,10) 
    LV_GetText(kod1,RowNumber,11) 
    LV_GetText(lvl,RowNumber,12) 
    LV_GetText(kod2,RowNumber,13) 
    LV_GetText(kod3,RowNumber,14) 
    LV_GetText(kod4,RowNumber,15) 
    LV_GetText(ClientName,RowNumber,16) 
    LV_GetText(ClientAddress,RowNumber,17) 
    LV_GetText(PersonPhone,RowNumber,18) 
    LV_GetText(PhoneIMEI,RowNumber,19) 
    LV_GetText(ClientName1,RowNumber,20)
MsgBox  %dog% %data3% %data1% %rem% %Master%
return</code></pre></div><p>и<br /></p><div class="codebox"><pre><code>MyListView:
if A_GuiEvent = DoubleClick
{
    LV_GetText(dog,A_EventInfo,1)
    LV_GetText(data3,A_EventInfo,2)
    LV_GetText(RequestDate,A_EventInfo,3) 
    LV_GetText(data1,A_EventInfo,4) 
    LV_GetText(rem,A_EventInfo,5) 
    LV_GetText(remont,A_EventInfo,6) 
    LV_GetText(Master,A_EventInfo,7) 
    LV_GetText(Disrepair3,A_EventInfo,8) 
    LV_GetText(asc,A_EventInfo,9) 
    LV_GetText(inj,A_EventInfo,10) 
    LV_GetText(kod1,A_EventInfo,11) 
    LV_GetText(lvl,A_EventInfo,12) 
    LV_GetText(kod2,A_EventInfo,13) 
    LV_GetText(kod3,A_EventInfo,14) 
    LV_GetText(kod4,A_EventInfo,15) 
    LV_GetText(ClientName,A_EventInfo,16) 
    LV_GetText(ClientAddress,A_EventInfo,17) 
    LV_GetText(PersonPhone,A_EventInfo,18) 
    LV_GetText(PhoneIMEI,A_EventInfo,19) 
    LV_GetText(ClientName1,A_EventInfo,20)
    MsgBox  %dog% %data3% %data1% %rem% %Master%
}</code></pre></div><p>?<br />Как можно заметить, действия здесь выполняются одни и те же, но переменные определяются по разному.</p>]]></description>
			<author><![CDATA[null@example.com (Skare)]]></author>
			<pubDate>Tue, 23 Aug 2011 12:34:59 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=50825#p50825</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=50824#p50824</link>
			<description><![CDATA[<p><a href="http://script-coding.com/AutoHotkey/ListView.html#rems"><strong>Примечания к ListView</strong></a>:<br /></p><div class="quotebox"><blockquote><p>Чтобы определить, когда была нажата клавиша Enter в то время, как ListView находился в фокусе, используйте кнопку по умолчанию...</p></blockquote></div><p>В подпрограмме кнопки можно получить номера и текст выделенных строк, как объяснено <a href="http://script-coding.com/AutoHotkey/ListView.html#extrdata">здесь</a>.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 23 Aug 2011 10:56:42 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=50824#p50824</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=50823#p50823</link>
			<description><![CDATA[<p>Немножко разобрался, но с этим:<br /></p><div class="quotebox"><cite>Skare пишет:</cite><blockquote><p>Как сделать так, что бы при выделении какой-либо строки в таблице и нажатии ентера, производилось то же действие, что и тут с дабл кликом:<br /></p><div class="codebox"><pre><code>MyListView:
if A_GuiEvent = DoubleClick
{
    LV_GetText(dog,A_EventInfo,1)
    LV_GetText(data3,A_EventInfo,2)
    LV_GetText(RequestDate,A_EventInfo,3) 
    LV_GetText(data1,A_EventInfo,4) 
    LV_GetText(rem,A_EventInfo,5) 
    LV_GetText(remont,A_EventInfo,6) 
    LV_GetText(Master,A_EventInfo,7) 
    LV_GetText(Disrepair3,A_EventInfo,8) 
    LV_GetText(asc,A_EventInfo,9) 
    LV_GetText(inj,A_EventInfo,10) 
    LV_GetText(kod1,A_EventInfo,11) 
    LV_GetText(lvl,A_EventInfo,12) 
    LV_GetText(kod2,A_EventInfo,13) 
    LV_GetText(kod3,A_EventInfo,14) 
    LV_GetText(kod4,A_EventInfo,15) 
    LV_GetText(ClientName,A_EventInfo,16) 
    LV_GetText(ClientAddress,A_EventInfo,17) 
    LV_GetText(PersonPhone,A_EventInfo,18) 
    LV_GetText(PhoneIMEI,A_EventInfo,19) 
    LV_GetText(ClientName1,A_EventInfo,20) 

}
return</code></pre></div><p>?</p></blockquote></div><p>И так ничего не понял:(.</p>]]></description>
			<author><![CDATA[null@example.com (Skare)]]></author>
			<pubDate>Tue, 23 Aug 2011 10:18:45 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=50823#p50823</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=50809#p50809</link>
			<description><![CDATA[<p>Обновлять можно в любом режиме с помощью функций <em>LV_Modify()</em>, <em>LV_Insert()</em> и т. п. Редактировать вручную можно только первую колонку. Для этого в ListView должны быть опция <em>-ReadOnly</em>. Уведомления о редактировании описаны <a href="http://script-coding.com/AutoHotkey/ListView.html#secnotify">здесь</a>.<br /></p><div class="quotebox"><cite>Skare пишет:</cite><blockquote><p>на эти вопросы в справке я ответа не нашёл(либо я был крайней невнимателен).</p></blockquote></div><p>Это да! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Mon, 22 Aug 2011 16:05:28 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=50809#p50809</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=50806#p50806</link>
			<description><![CDATA[<p>Ещё раз огромное спасибо, с этим разобрался:-). Но возникли ещё некоторые вопросы:<br />Как сделать так, что бы при выделении какой-либо строки в таблице и нажатии ентера, производилось то же действие, что и тут с дабл кликом:<br /></p><div class="codebox"><pre><code>MyListView:
if A_GuiEvent = DoubleClick
{
    LV_GetText(dog,A_EventInfo,1)
    LV_GetText(data3,A_EventInfo,2)
    LV_GetText(RequestDate,A_EventInfo,3) 
    LV_GetText(data1,A_EventInfo,4) 
    LV_GetText(rem,A_EventInfo,5) 
    LV_GetText(remont,A_EventInfo,6) 
    LV_GetText(Master,A_EventInfo,7) 
    LV_GetText(Disrepair3,A_EventInfo,8) 
    LV_GetText(asc,A_EventInfo,9) 
    LV_GetText(inj,A_EventInfo,10) 
    LV_GetText(kod1,A_EventInfo,11) 
    LV_GetText(lvl,A_EventInfo,12) 
    LV_GetText(kod2,A_EventInfo,13) 
    LV_GetText(kod3,A_EventInfo,14) 
    LV_GetText(kod4,A_EventInfo,15) 
    LV_GetText(ClientName,A_EventInfo,16) 
    LV_GetText(ClientAddress,A_EventInfo,17) 
    LV_GetText(PersonPhone,A_EventInfo,18) 
    LV_GetText(PhoneIMEI,A_EventInfo,19) 
    LV_GetText(ClientName1,A_EventInfo,20) 

}
return</code></pre></div><p>?<br />Можно ли обновлять таблицу в режиме реального времени?:) Или хотя бы отдельной кнопочкой?<br />Можно ли как-нибудь редактировать данную таблицу? Что бы при этом в том &quot;файлике-базе&quot; так же изменялась\добавлялась информация?:-)<br />Пока всё, на эти вопросы в справке я ответа не нашёл(либо я был крайней невнимателен).</p>]]></description>
			<author><![CDATA[null@example.com (Skare)]]></author>
			<pubDate>Mon, 22 Aug 2011 15:52:10 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=50806#p50806</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=50801#p50801</link>
			<description><![CDATA[<p>В <a href="http://script-coding.com/AutoHotkey/ListView.html#firstnotify">справке</a> всё написано.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Mon, 22 Aug 2011 13:10:13 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=50801#p50801</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=50800#p50800</link>
			<description><![CDATA[<p>А, да, простите, я не заметил:( Опечатался значит:-) .<br />Прекрасно работает! А можно ли сделать так, что бы при двойном клике на какую-либо строку, выполнялось какое-нибудь действие с этими данными, например вывод их в окошке через &quot;MsgBox&quot;?</p>]]></description>
			<author><![CDATA[null@example.com (Skare)]]></author>
			<pubDate>Mon, 22 Aug 2011 12:54:56 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=50800#p50800</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=50799#p50799</link>
			<description><![CDATA[<p>Примерно так:<br /></p><div class="codebox"><pre><code>InputFile = D:\Input.txt

Items := &quot;№|data3|RequestDate|data1|remont|Master|asc|inj|kod1|kod2|kod3|&quot;
      . &quot;kod4|ClientName|ClientAddress|ClientPhone|PhoneIMEI|ClientName1&quot;
Gui, Add, ListView, r20 w700, % Items
      
StringReplace, Items1, Items, №, dog
StringReplace, Items1, Items1, ClientPhone, PersonPhone

FileRead, Text, %InputFile%
StartPos := 1
Loop
{
   StartPos := RegExMatch(Text, &quot;s)(^|\$End)(.*?)\$End&quot;, Found, StartPos) + 1  ; сдвигаем стартовую позицию
   if !Found2
      Break
      
   Loop, parse, Items1, |
   {
      RegExMatch(Found2, &quot;im`a)&quot; A_LoopField &quot;:[ \t]*(.*)$&quot;, Found)
      %A_LoopField% := Found1
   }
   LV_Add(&quot;&quot;, dog, data3, RequestDate, data1, remont, Master, asc, inj
            , kod1, kod2, kod3, kod4, ClientName, ClientAddress 
            , PersonPhone, PhoneIMEI, ClientName1)
}

Loop 17
   LV_ModifyCol(A_Index, &quot;AutoHdr&quot;)

Gui, Show</code></pre></div><p>У тебя в файле <strong>Person</strong>Phone, а в скрипте заголовок столбца — <strong>Client</strong>Phone (нужна лишняя операция по замене); в файле ClientA<strong>dd</strong>ress, в скрипте — ClientA<strong>d</strong>ress (исправил).</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Mon, 22 Aug 2011 12:46:37 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=50799#p50799</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Загрузка базы в ListView]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=50794#p50794</link>
			<description><![CDATA[<p>Доброго времени суток, форумчане! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p><p>Возникла небольшая проблема в работе с &quot;ListView&quot;, саму таблицу создал, всё прекрасно, но как туда занести данные извне? :-)</p><p>Есть вот <a href="http://rghost.ru/18843001">такой</a> текстовый файлик-база.</p><p>Требуется занести данные вот в эту таблицу:<br /></p><div class="codebox"><pre><code>Gui, Add, ListView, r20 w700 , №|data3|RequestDate|data1|remont|Master|asc|inj|kod1|kod2|kod3|kod4|ClientName|ClientAdress|ClientPhone|PhoneIMEI|ClientName1</code></pre></div><p>Всё что я смог, это &quot;вынести&quot; данные с базы в переменные, но для этого требовалось ввести как минимум, 1 данное &quot;dog&quot;:<br /></p><div class="codebox"><pre><code>#NoEnv
FilePath = D:\Input.txt ; указать путь к текстовому файлу

dog = 604463
Items = 

data1,data3,Rem,remont,Master,asc,inj,kod1,lvl,kod2,kod3,kod4,RequestDate,Disrepair3,ClientName,ClientAddress,PersonPhone,PersonIMEI,ClientName1

FileRead, Text, % FilePath

RegExMatch(Text, &quot;s)dog:[ \t]*&quot; dog &quot;.*?End&quot;, Found)
Loop, parse, Items, `,, %A_Space%
{
   RegExMatch(Found, &quot;s).*?&quot; A_LoopField &quot;:[ \t]*(.*?)\R&quot;, %A_LoopField%)
   %A_LoopField% := %A_LoopField%1
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Skare)]]></author>
			<pubDate>Mon, 22 Aug 2011 08:59:45 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=50794#p50794</guid>
		</item>
	</channel>
</rss>
