<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Загрузка базы в ListView]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=6142&amp;type=atom" />
	<updated>2012-04-04T22:30:10Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=6142</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58843#p58843" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Александр_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24888</uri>
			</author>
			<updated>2012-04-04T22:30:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58843#p58843</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58839#p58839" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2012-04-04T15:46:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58839#p58839</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58797#p58797" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong><br />Видимо, либо создавать текст скрипта динамически, писать во временный файл и запускать, либо работать с ListView через API. Может, всё-таки проще прописать параметров с запасом? 100 колонок — это абсурд какой-то, по-моему. Что, реально может быть так много?</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2012-04-04T02:39:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58797#p58797</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58790#p58790" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2012-04-03T16:14:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58790#p58790</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50826#p50826" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-08-23T13:40:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50826#p50826</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50825#p50825" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Skare]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26172</uri>
			</author>
			<updated>2011-08-23T12:34:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50825#p50825</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50824#p50824" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-08-23T10:56:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50824#p50824</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50823#p50823" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Skare]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26172</uri>
			</author>
			<updated>2011-08-23T10:18:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50823#p50823</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50809#p50809" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-08-22T16:05:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50809#p50809</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50806#p50806" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Skare]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26172</uri>
			</author>
			<updated>2011-08-22T15:52:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50806#p50806</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50801#p50801" />
			<content type="html"><![CDATA[<p>В <a href="http://script-coding.com/AutoHotkey/ListView.html#firstnotify">справке</a> всё написано.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-08-22T13:10:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50801#p50801</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50800#p50800" />
			<content type="html"><![CDATA[<p>А, да, простите, я не заметил:( Опечатался значит:-) .<br />Прекрасно работает! А можно ли сделать так, что бы при двойном клике на какую-либо строку, выполнялось какое-нибудь действие с этими данными, например вывод их в окошке через &quot;MsgBox&quot;?</p>]]></content>
			<author>
				<name><![CDATA[Skare]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26172</uri>
			</author>
			<updated>2011-08-22T12:54:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50800#p50800</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузка базы в ListView]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50799#p50799" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-08-22T12:46:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50799#p50799</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Загрузка базы в ListView]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50794#p50794" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Skare]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26172</uri>
			</author>
			<updated>2011-08-22T08:59:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50794#p50794</id>
		</entry>
</feed>
