<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: ini. Как сделать считывание всей информации]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10741&amp;type=atom" />
	<updated>2015-07-04T21:48:59Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10741</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ini. Как сделать считывание всей информации]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=94945#p94945" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Доктор ТуамОсес пишет:</cite><blockquote><p>А как обработать такой код? Тоже использовать iniread?</p></blockquote></div><p><a href="http://ahkscript.org/docs/commands/ComObjCreate.htm">ComObjCreate()</a><br /><a href="http://www.script-coding.com/XMLDOMscripts.html">Сценарии объектной модели документа DOM XML средствами OLE-Automation</a><br /><a href="http://forum.script-coding.com/viewtopic.php?id=2900">VBScript: работа с XML с помощью компонента Chilkat XML</a></p><p><a href="http://forum.script-coding.com/viewtopic.php?pid=80656#p80656">VBS: Конфигурационный файл. Структура.</a><br /><a href="http://forum.script-coding.com/viewtopic.php?id=8659">JScript: Вывести значение тега из XML-файла на страницу HTA-приложения</a><br /><a href="http://forum.script-coding.com/viewtopic.php?id=6420">WSH: Обработка XML</a><br /><a href="http://forum.script-coding.com/viewtopic.php?id=6394">WSH: Поиск и извлечение текста из XML</a><br /><a href="http://forum.script-coding.com/viewtopic.php?id=6163">VBS: Изменение значения переменной в XML файле</a><br /><a href="http://forum.script-coding.com/viewtopic.php?id=5262">VBS: XMLDOM</a></p>]]></content>
			<author>
				<name><![CDATA[Мальчик-гей]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30832</uri>
			</author>
			<updated>2015-07-04T21:48:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=94945#p94945</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ini. Как сделать считывание всей информации]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=94942#p94942" />
			<content type="html"><![CDATA[<p>А как обработать такой код? Тоже использовать iniread?<br /></p><div class="codebox"><pre><code>&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;notebook version=&quot;2813&quot; uid=&quot;bf1fbe51-d00c-4dcd-a495-05392cee7c3a&quot;&gt;
    &lt;tags&gt;
    &lt;/tags&gt;
    &lt;sections&gt;
        &lt;section id=&quot;0&quot; num=&quot;0&quot; name=&quot;Главная&quot; color=&quot;#005af0&quot; /&gt;
    &lt;/sections&gt;
    &lt;note uid=&quot;50bb80da-3f32-4b3d-a305-73a224ce43c4&quot; 
        title=&quot;Заметка 2&quot; 
        created=&quot;20150704T210200&quot; 
        modified=&quot;20150704T210200&quot; 
        source=&quot;&quot; 
        link=&quot;&quot; 
        remarks=&quot;&quot; 
        tags=&quot;Теги/Тег_Б&quot; 
        section=&quot;0&quot; 
        plainText=&quot;1&quot;&gt;&lt;![CDATA[Это вторая моя заметка]]&gt;&lt;/note&gt;
    &lt;note uid=&quot;50bb80da-3f32-4b3d-a305-73a224ce43c3&quot; 
        title=&quot;ЗАМЕТКА1&quot; 
        created=&quot;20150704T205925&quot; 
        modified=&quot;20150704T211727&quot; 
        source=&quot;&quot; 
        link=&quot;&quot; 
        remarks=&quot;&quot; 
        tags=&quot;Тег_А Теги/Тег_Б&quot; 
        section=&quot;0&quot; 
        plainText=&quot;1&quot;&gt;&lt;![CDATA[[Тест]]]&gt;&lt;/note&gt;
&lt;/notebook&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Доктор ТуамОсес]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31413</uri>
			</author>
			<updated>2015-07-04T18:47:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=94942#p94942</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ini. Как сделать считывание всей информации]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=94935#p94935" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Построчный fileread</p></blockquote></div><p>IniRead позволяет сначала узнать имена секций (если нужно), а далее извлечь содержимое секции.<br /></p><div class="codebox"><pre><code>
[Section1]
Key1=Data=1
Key2=Data=2
Key3=Data=3
[Section2]
Key11=Data=11
Key22=Data=22
Key33=Data=33
</code></pre></div><div class="codebox"><pre><code>
Path=C:\Users\sergey\Desktop\file.ini
IniRead, Sections, % Path, , , % A_Space
Loop, parse, Sections, `n
{
    IniRead, Data, % Path, % A_LoopField, , % A_Space
    Loop, parse, Data, `n 
        RegExMatch(A_LoopField, &quot;(.*?)=(.*)&quot;, OutputVar)
        , %OutputVar1% := OutputVar2 
}
MsgBox % Key1 &quot;`n&quot; Key2 &quot;`n&quot; Key3
MsgBox % Key11 &quot;`n&quot; Key22 &quot;`n&quot; Key33
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-07-04T15:35:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=94935#p94935</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ini. Как сделать считывание всей информации]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=94929#p94929" />
			<content type="html"><![CDATA[<p>Просто я предполагаю, что автор ваяет на AHK, что-то типа самомодифицирующегося/автособираемого кода. Для этого ему и нужно, чтобы содержимое ini-файла интерпретировалось как AHK-код</p><p>Прошу простить. Просто автора нет вот я и решил &quot;встрять&quot;</p>]]></content>
			<author>
				<name><![CDATA[Доктор ТуамОсес]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31413</uri>
			</author>
			<updated>2015-07-04T14:33:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=94929#p94929</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ini. Как сделать считывание всей информации]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=94926#p94926" />
			<content type="html"><![CDATA[<p>Ну и что, что вы писали? Вопрос-то мой не к вам был.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2015-07-04T12:29:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=94926#p94926</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ini. Как сделать считывание всей информации]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=94922#p94922" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>YMP пишет:</cite><blockquote><p>Т.е. вы заранее не знаете, какие у вас будут переменные? Как тогда вы их будете использовать?</p></blockquote></div><p>Я уже писал в какой-то теме про самомодифицирующиеся AHK скрипты (которые модифицируют свой собственный код в процессе работы) и выполнение генерируемых &quot;на лету&quot; строк как кода.</p>]]></content>
			<author>
				<name><![CDATA[Доктор ТуамОсес]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31413</uri>
			</author>
			<updated>2015-07-04T11:42:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=94922#p94922</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ini. Как сделать считывание всей информации]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=94902#p94902" />
			<content type="html"><![CDATA[<p>Это как раз всем понятно, переозвучивая вопрос выше -&nbsp; не &quot;как&quot;, а &quot;нафига&quot;? И что делать с переменной, название которой заранее не знаешь.</p>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2015-07-04T09:01:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=94902#p94902</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ini. Как сделать считывание всей информации]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=94900#p94900" />
			<content type="html"><![CDATA[<p>Построчный fileread с regex парсингом: всё что слева от знака равенства - имя переменной, всё что справа - записать её значением.</p>]]></content>
			<author>
				<name><![CDATA[Drugoy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27463</uri>
			</author>
			<updated>2015-07-04T08:06:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=94900#p94900</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ini. Как сделать считывание всей информации]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=94899#p94899" />
			<content type="html"><![CDATA[<p>Точно не знаю. Я надеялся, что когда все переменные будут известны, по тому же способу, что определение ключа я и буду их брать. Но вообще, кажется, я нашел альтернативу.</p>]]></content>
			<author>
				<name><![CDATA[sergeyols]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31692</uri>
			</author>
			<updated>2015-07-04T05:58:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=94899#p94899</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ini. Как сделать считывание всей информации]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=94898#p94898" />
			<content type="html"><![CDATA[<p>Т.е. вы заранее не знаете, какие у вас будут переменные? Как тогда вы их будете использовать?</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2015-07-04T05:33:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=94898#p94898</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ini. Как сделать считывание всей информации]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=94894#p94894" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>sergeyols</strong>, ознакомьтесь с <a href="http://forum.script-coding.com/viewtopic.php?id=6148">этой</a> темой, отредактируйте заголовок.</span></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-07-04T00:48:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=94894#p94894</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: ini. Как сделать считывание всей информации]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=94893#p94893" />
			<content type="html"><![CDATA[<p>В общем, мне нужно, чтобы из определенного ини файла считывалась информация в переменные с названием ключа. <br />Т.е. в файле у нас: &quot;Information=Test&quot;, а получаем переменную с названием &quot;Information&quot;, содержимое &quot;Test&quot;</p>]]></content>
			<author>
				<name><![CDATA[sergeyols]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31692</uri>
			</author>
			<updated>2015-07-04T00:37:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=94893#p94893</id>
		</entry>
</feed>
