<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Конвертирование reg файлов в ahk]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=12051&amp;type=atom" />
	<updated>2016-09-30T14:01:48Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=12051</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Конвертирование reg файлов в ahk]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=108127#p108127" />
			<content type="html"><![CDATA[<p>Может все-таки пойти по такому пути? Я накропал пока чисто схематический вариант:<br /></p><div class="codebox"><pre><code>#NoEnv
#NoTrayIcon
#SingleInstance force
SendMode Input
SetBatchLines -1

If !A_IsAdmin
	{
	Run % &quot;*RunAs &quot;&quot;&quot; A_ScriptFullPath &quot;&quot;&quot;&quot;
	ExitApp
	}
	
ProgramName := &quot;RegFile2Ahk&quot;
SourceDir := &quot;xxxxx&quot;

/*
GetRegFile:
Title := &quot;Выбор файла реестра для конвертирования&quot;
FileSelectFile RegFile, 3, % SourceDir, % Title, Файлы реестра (*.reg)
If !RegFile
	{
	MsgBox 0x34, % ProgramName, Файл реестра не выбран!`n`nПовторить?
	IfMsgBox Yes
		{
		GoTo GetRegFile
		}
	IfMsgBox No
		{
		ExitApp
		}
	}
*/	
RegFile := A_ScriptDir &quot;\REGISTRY-TEST.reg&quot;



FileRead Primary, % RegFile
Primary := RegExReplace(Primary, &quot;i)Windows Registry Editor Version.*?(\R+|$)&quot;) ; удаление Windows Registry Editor Version 5.00
Primary := RegExReplace(Primary, &quot;@=&quot;&quot;&quot;&quot;(\R+|$)&quot;) ; удаление пустых значений (по-умолчанию)

; @=&quot;бубль гум&quot; (обычно по-умолчанию REG_SZ, якорь замены @=&quot;&quot;)
Primary := RegExReplace(Primary, &quot;@=&quot;&quot;(.*)&quot;&quot;&quot;, &quot;RegWrite REG_SZ, RegPath,, $1&quot;)

; &quot;this_is_REG_SZ&quot;=&quot;C:\\Program Files\\Registry Workshop\\RegWorkshop.exe&quot; (якорь замены   =&quot; &gt; REG_SZ)
Primary := RegExReplace(Primary, &quot;&quot;&quot;(.*)&quot;&quot;=&quot;&quot;(.*)&quot;&quot;&quot;, &quot;RegWrite REG_SZ, RegPath, $1, $2&quot;)

; &quot;this_is_REG_DWORD&quot;=dword:00477579 (якорь замены   =dword: &gt; REG_DWORD)
Primary := RegExReplace(Primary, &quot;&quot;&quot;(.*)&quot;&quot;=dword:(\d+)&quot;, &quot;RegWrite REG_DWORD, RegPath, $1, $2&quot;)

; &quot;this_is_REG_BINARY&quot;=hex:34,37,37,35,\ (якорь замены   =hex: &gt; REG_BINARY)
Primary := RegExReplace(Primary, &quot;&quot;&quot;(.*)&quot;&quot;=hex:(.*)\\&quot;, &quot;RegWrite REG_BINARY, RegPath, $1, $2&quot;)

; &quot;this_is_REG_MULTI_SZ&quot;=hex(7):33,00,38,00,\ (якорь замены   =hex(7): &gt; REG_MULTI_SZ)
Primary := RegExReplace(Primary, &quot;&quot;&quot;(.*)&quot;&quot;=hex\(7\):(.*)\\&quot;, &quot;RegWrite REG_MULTI_SZ, RegPath, $1, $2&quot;)

; &quot;this_is_REG_EXPAND_SZ&quot;=hex(2):22,00,43,00,\ (якорь замены   =hex(2): &gt; REG_EXPAND_SZ)
Primary := RegExReplace(Primary, &quot;&quot;&quot;(.*)&quot;&quot;=hex\(2\):(.*)\\&quot;, &quot;RegWrite REG_EXPAND_SZ, RegPath, $1, $2&quot;)

; &quot;this_is_REG_QWORD&quot;=hex(b):34,37,37,35 (якорь замены   =hex(b): &gt; REG_QWORD)
Primary := RegExReplace(Primary, &quot;&quot;&quot;(.*)&quot;&quot;=hex\(b\):(\d+)&quot;, &quot;RegWrite REG_QWORD, RegPath, $1, $2&quot;)

Primary := StrReplace(Primary, &quot;\\&quot;, &quot;\&quot;, &quot;All&quot;) ; замена double backslash на один
Primary := StrReplace(Primary, &quot;\&quot;&quot;&quot;, &quot;&quot;&quot;&quot;, &quot;All&quot;) ; удаление оставшихся backslash перед двойными кавычками в path \&quot;  \&quot;
GoTo Print



/*
Здесь преобразовать Path реестра [HKEY_CURRENT_USER\Software\TEST] в вид &quot;HKCR, Software\TEST,&quot; затем удалить эти строки и заменить якоря &quot;RegPath&quot; на полученные измененные строки
*/
/*
; Secondary
Loop read, % RegFile
	{
	If A_LoopReadLine contains [HKEY_ ; если строка содержит &quot;[HKEY_&quot; (path реестра)
		{
		MsgBox % RegPath(Secondary)
		}
	}
	
RegPath(Secondary)
	{
	Secondary := RegExReplace(A_LoopReadLine, &quot;i)\[HKEY_CLASSES_ROOT\\(.*)\]&quot;, &quot;RegWrite HKCR, $1, *&quot;)
	Secondary := RegExReplace(Secondary, &quot;i)\[HKEY_CURRENT_USER\\(.*)\]&quot;, &quot;RegWrite HKCU, $1, *&quot;)
	Secondary := RegExReplace(Secondary, &quot;i)\[HKEY_LOCAL_MACHINE\\(.*)\]&quot;, &quot;RegWrite HKLM, $1, *&quot;)
	Return Secondary
	}

*/
/*
В заключении преобразовать HEX данные в краткие читабельные строки. Имеется ввиду REG_MULTI_SZ
*/

Print:
SplitPath RegFile,,,, RegFileNoExt
FileAppend
	(
	% Primary
	), % RegFileNoExt &quot;.ahk&quot;, UTF-8
	
ExitApp

/*_________________________________________

Имена корневых разделов:

HKEY_CLASSES_ROOT = HKCR
HKEY_CURRENT_USER = HKCU
HKEY_LOCAL_MACHINE = HKLM
HKEY_USERS = HKU
HKEY_CURRENT_CONFIG = HKCC
___________________________________________

Типы параметров:

Наименование					Тип данных		Назначение

REG_SZ							Строковый		Текст
REG_DWORD						Числовой		Число
REG_BINARY						Двоичный		Двоичные данные
REG_EXPAND_SZ					Строковый		Текст и переменные
REG_MULTI_SZ					Многостроковый	Массив строк
REG_LINK						Строковый		Путь к файлу
REG_QWORD						Числовой		64-разрядное числовое значение
REG_NONE						Неизвестный		Зашифрованные данные
REG_RESOURCE_LIST				Строковый		Список ресурсов устройств
REG_FULL_RESOURCE_DESCRIPTOR	Строковый		Идентификатор ресурса устройства
REG_RESOURCE_REQUIREMENTS_LIST	Строковый		Идентификатор ресурса устройства
___________________________________________


</code></pre></div><p>Сделал тестовый вариант регфайла REGISTRY-TEST.reg с наиболее часто используемыми типами (для лучшей читабельности разделил строки пустыми):</p><div class="codebox"><pre><code>Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\TEST]
@=&quot;&quot;

&quot;this_is_REG_SZ-1&quot;=&quot;\&quot;C:\\Program Files\\Notepad++\\notepad++.exe\&quot;&quot;

&quot;this_is_REG_SZ-2&quot;=&quot;C:\\Program Files\\Registry Workshop\\RegWorkshop.exe&quot;

&quot;this_is_REG_SZ-3&quot;=&quot;Shutdown;Reboot;Hibernate;LogOff&quot;

&quot;this_is_REG_BINARY&quot;=hex:34,37,37,35,37,39,20,34,36,36,31,37,37,36,42,36,35,37,\
  33

&quot;this_is_REG_DWORD&quot;=dword:00477579

&quot;this_is_REG_MULTI_SZ&quot;=hex(7):33,00,38,00,20,00,3f,04,3e,04,3f,04,43,04,33,04,\
  30,04,35,04,32,04,00,00,31,04,43,04,31,04,3b,04,4c,04,00,00,33,04,43,04,3c,\
  04,00,00,00,00

&quot;this_is_REG_EXPAND_SZ&quot;=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,\
  72,00,61,00,6d,00,20,00,46,00,69,00,6c,00,65,00,73,00,5c,00,41,00,75,00,74,\
  00,6f,00,48,00,6f,00,74,00,6b,00,65,00,79,00,5c,00,41,00,75,00,74,00,6f,00,\
  48,00,6f,00,74,00,6b,00,65,00,79,00,2e,00,65,00,78,00,65,00,22,00,00,00

&quot;this_is_REG_QWORD&quot;=hex(b):34,37,37,35,37,39,20,34

[HKEY_CURRENT_USER\Software\TEST-2]
@=&quot;бубль гум&quot;
</code></pre></div><p>Если скрипт допилить по такой схеме, то будет меньше кода и быстрее будет обработка, полагаю. Здесь главное создать&nbsp; более унифицированные шаблоны RegExReplace() для первоначального прохождения &quot;Primary&quot;.</p><p>Кстати, если заменить &quot;\&quot;&quot;\n (новая строка)&quot; в многострочных параметрах типа:<br /></p><div class="codebox"><pre><code>&quot;this_is_REG_EXPAND_SZ&quot;=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,\
  72,00,61,00,6d,00,20,00,46,00,69,00,6c,00,65,00,73,00,5c,00,41,00,75,00,74,\</code></pre></div><p>на конкатинацию ahk &quot;.&quot; будет ли это дело работать? Вытягивать все это дело в одну строку тоже неудобно ....</p>]]></content>
			<author>
				<name><![CDATA[freeZer0K]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34228</uri>
			</author>
			<updated>2016-09-30T14:01:48Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=108127#p108127</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Конвертирование reg файлов в ahk]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=108126#p108126" />
			<content type="html"><![CDATA[<p>Что вообще значит &quot;конвертировать reg файл в ahk&quot;?<br />Я правильно понимаю, что на выходе получается *.ahk скрипт с кучей RegWrite? Если да, то зачем это нужно?</p>]]></content>
			<author>
				<name><![CDATA[Drugoy]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27463</uri>
			</author>
			<updated>2016-09-30T12:03:51Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=108126#p108126</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Конвертирование reg файлов в ahk]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=108125#p108125" />
			<content type="html"><![CDATA[<p>Ещё после &quot;удаляющей&quot; строки желательно ставить пустую строку.<br /></p><div class="codebox"><pre><code>[-HKEY_CURRENT_USER\Test]
[-HKEY_CURRENT_USER\Test2]
[HKEY_CURRENT_USER\Test]
&quot;a&quot;=&quot;1&quot;
</code></pre></div><p>Так правильно:<br /></p><div class="codebox"><pre><code>[-HKEY_CURRENT_USER\Test]
[-HKEY_CURRENT_USER\Test2]

[HKEY_CURRENT_USER\Test]
&quot;a&quot;=&quot;1&quot;
</code></pre></div><p>В общем конвертор ещё далек от идеала.</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2016-09-30T09:57:46Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=108125#p108125</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Конвертирование reg файлов в ahk]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=108124#p108124" />
			<content type="html"><![CDATA[<p>Подправил код в первом сообщении, попробуй.</p><p>OFF: Модераторы, простите. Слишком поздно удалил сообщение.</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2016-09-30T09:43:31Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=108124#p108124</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Конвертирование reg файлов в ahk]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=108123#p108123" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Alectric пишет:</cite><blockquote><p>Обычно в экспортированных файлах реестра после первой строки должна быть одна пустая строка, насколько помню...</p></blockquote></div><p>Но после последующей правки её может и не быть, так же как в экспортированном файле не может быть строки </p><div class="codebox"><pre><code>[-HKEY_CURRENT_USER\Test]</code></pre></div><p>но я строки такого вида обычно добавляю перед строками вида </p><div class="codebox"><pre><code>[HKEY_CURRENT_USER\Test]</code></pre></div><p> для очистки раздела от всех записей, кроме явно добавляемых этим файлом.</p>]]></content>
			<author>
				<name><![CDATA[wisgest]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=3850</uri>
			</author>
			<updated>2016-09-30T09:39:06Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=108123#p108123</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Конвертирование reg файлов в ahk]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=108120#p108120" />
			<content type="html"><![CDATA[<p>Попробовал обработать файл следующего содержания:<br /></p><div class="codebox"><pre><code>REGEDIT4
[-HKEY_CURRENT_USER\Test]
</code></pre></div><p>Получил на выходе:<br /></p><div class="codebox"><pre><code>;RegToAhk
,,,,REGEDIT4,REGEDIT4
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[wisgest]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=3850</uri>
			</author>
			<updated>2016-09-30T09:04:54Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=108120#p108120</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Конвертирование reg файлов в ahk]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=108118#p108118" />
			<content type="html"><![CDATA[<p>Скрипт довольно таки старый, но рабочий, по этому переделывать лень, да и времени нет.</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2016-09-30T02:11:53Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=108118#p108118</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Конвертирование reg файлов в ahk]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=108116#p108116" />
			<content type="html"><![CDATA[<p><strong>Alectric</strong>, большущее спасибо!<br />Скрипт работает!</p><p>Я бы еще сократил названия разделов реестра.<br />В скрипте, который начал писать, предварительно я сделал так:</p><div class="codebox"><pre><code>RegExReplace(RegPath, &quot;i)\[HKEY_CLASSES_ROOT\\(.*)\]&quot;, &quot;RegWrite ... HKCR, $1, ...&quot;)</code></pre></div><p>ну и все остальные по такому типу.</p><p>В общем, еще раз БОЛЬШУЩЕЕ благодарю! Думаю, многим понадобится этот скрипт.</p>]]></content>
			<author>
				<name><![CDATA[freeZer0K]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34228</uri>
			</author>
			<updated>2016-09-29T21:24:23Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=108116#p108116</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Конвертирование reg файлов в ahk]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=108115#p108115" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><div class="codebox"><pre><code>deystvie=
    typ=
    razdel=
    vetv=
    parametr=
    znachenie=</code></pre></div></blockquote></div><p>Мрак!</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-09-29T19:18:10Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=108115#p108115</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Конвертирование reg файлов в ahk]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=108114#p108114" />
			<content type="html"><![CDATA[<p>Скрипт для конвертирования файлов реестра (*.reg) в формат ahk.<br /></p><div class="codebox"><pre><code>#NoTrayIcon
#NoEnv
#SingleInstance,Force
SetBatchLines,-1
Process,Priority,,low
SetFormat,float,6.2

param1=%1%
if param1=
{
  FileSelectFile,FileToConvert,1,,Выберите файл для конвертирования,Рег файлы (*.reg)
  if errorlevel
    exitapp
}
else
  FileToConvert=%Param1%

FileRead,out,%FileToConvert%
loop,parse,out,`n
  step:=a_index/100
if step=0
  step=1

Gui,-SysMenu
Gui,Add,Progress,xm ym w400 h20 cBlue vSProgress
Gui,Add,text,xm y+5 w400 h40 vtxt
Gui,Add,Button,xm y+5 w400 h20,Отмена
Gui,Show,,Конвертирование %FileToConvert%

skip=0

WinGet,ID,ID,A
fileappend,;RegToAhk`n,%FileToConvert%.ahk
Loop,Read,%FileToConvert%,%FileToConvert%.ahk
{
  row:=A_Index
  GuiControl,,txt,Обработка строки №: %row%
  GuiControl,,SProgress,%SProgres%
  WinSetTitle,ahk_id %ID%,,%SProgres%`% Конвертирование %FileToConvert%
  SProgres:=% A_Index/step

  line:=A_LoopReadLine

if bin=
{
  if (line=&quot;&quot; or line=&quot;Windows Registry Editor Version 5.00&quot; or line=&quot;REGEDIT4&quot;)
  {
    if razdelchek=1
    {
      fileappend,%deystvie%`,REG_SZ`,%razdel%`,%vetv%`n
      razdelchek=0
    }
    deystvie=
    typ=
    razdel=
    vetv=
    parametr=
    znachenie=
    continue
  }

  if line contains [H,=
    deystvie=RegWrite
  if line contains =-,[-H
    deystvie=RegDelete

  if line contains [H,[-H
  {
    if razdelchek=1
      fileappend,%deystvie%`,REG_SZ`,%razdel%`,%vetv%`n
    if line contains HKEY_CURRENT_USER
      razdel=HKEY_CURRENT_USER
    if line contains HKEY_LOCAL_MACHINE
      razdel=HKEY_LOCAL_MACHINE
    if line contains HKEY_CLASSES_ROOT
      razdel=HKEY_CLASSES_ROOT
    if line contains HKEY_USERS
      razdel=HKEY_USERS
    if line contains HKEY_CURRENT_CONFIG
      razdel=HKEY_CURRENT_CONFIG
    vetv:=RegExReplace(line, &quot;\[-?&quot; razdel &quot;\\(.*)\]&quot; , &quot;$1&quot;)

    razdelchek=1
    continue
  }
  razdelchek=0

  parametr:=RegExReplace(line, &quot;&quot;&quot;(.*)&quot;&quot;=.*&quot; , &quot;$1&quot;)
;  StringReplace,parametr,parametr,`,,```,,All
;  StringReplace,parametr,parametr,`%,```%,All
  if line contains `@=
    parametr=`@

  if line contains =
    typ=REG_SZ
  if line contains =dword:
    typ=REG_DWORD
  if line contains =hex(b):
    typ=REG_QWORD
  if line contains =hex:
    typ=REG_BINARY
  if line contains =hex(0):,=hex(2):,=hex(8):,=hex(9):
    typ=REG_EXPAND_SZ
  if line contains =hex(7):
    typ=REG_MULTI_SZ
}

  if line contains `@=
    znachenie:=RegExReplace(line, &quot;`@=(.*)&quot; , &quot;$1&quot;)
  else
    znachenie:=RegExReplace(line, &quot;&quot;&quot;&quot; parametr &quot;&quot;&quot;=(.*)&quot; , &quot;$1&quot;)

  if typ=REG_SZ
    znachenie:=RegExReplace(znachenie, &quot;&quot;&quot;(.*)&quot;&quot;&quot; , &quot;$1&quot;)
  if typ=REG_DWORD
    StringReplace,znachenie,znachenie,dword:,0x,1
  if typ=REG_QWORD
    StringReplace,znachenie,znachenie,`,,,All
  if typ=REG_BINARY
  {
    if znachenie contains \
    {
      bin=1
      temp.=znachenie
      continue
    }
    temp.=znachenie
    znachenie:=temp
    temp=
    bin=
    StringReplace,znachenie,znachenie,hex:,,1
    StringReplace,znachenie,znachenie,%a_space%,,All
    StringReplace,znachenie,znachenie,`n,,All
    StringReplace,znachenie,znachenie,\,,All
    StringReplace,znachenie,znachenie,`,,,All
  }
  if (typ=&quot;REG_EXPAND_SZ&quot; or typ=&quot;REG_MULTI_SZ&quot;)
  {
    if znachenie contains \
    {
      bin=1
      temp.=znachenie
      continue
    }
    temp.=znachenie
    znachenie:=temp
    temp=
    bin=
    znachenie:=RegExReplace(znachenie, &quot;hex\(\d\):(.*)&quot; , &quot;$1&quot;)
    StringReplace,znachenie,znachenie,%a_space%,,All
    StringReplace,znachenie,znachenie,`n,,All
    StringReplace,znachenie,znachenie,\,,All
    StringReplace,znachenie,znachenie,`,,,All
    znachenie:=Hex2Text(znachenie)
  }
;msgbox,%line%`n`np=%parametr%`n`nz=%znachenie%

  znachenie:=RegExReplace(znachenie, &quot;``&quot; , &quot;````&quot;)
  StringReplace,znachenie,znachenie,`%,```%,All
  StringReplace,znachenie,znachenie,\\,\,All
  StringReplace,znachenie,znachenie,\`&quot;,`&quot;,All
  znachenie:=RegExReplace(znachenie, &quot;\;&quot; , &quot;```;&quot;)
  if deystvie=RegDelete
  {
    if parametr=`@
      line=RegWrite,REG_SZ,%razdel%,%vetv%,,,
    else
      line=%deystvie%,%razdel%,%vetv%,%parametr%
  }
  else
  {
    if parametr=`@
      line=%deystvie%,%typ%,%razdel%,%vetv%,,%znachenie%
    else
      line=%deystvie%,%typ%,%razdel%,%vetv%,%parametr%,%znachenie%
  }
  FileAppend,%line%`n
}
GuiControl,,txt,Обработка строки №: %row%`n`nКонвертирование завершено.
sleep,3000
gui,destroy
exitapp


ButtonОтмена:
  ExitApp


Hex2Text(Hex)
{
  startpos:=1
  Loop % StrLen(Hex)/2
  {
    n .= Chr( &quot;0x&quot; . SubStr(Hex, StartPos+2 , 2) . SubStr(Hex, StartPos , 2) )
    startpos +=4
  }
  Return n
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2016-09-29T18:55:54Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=108114#p108114</id>
		</entry>
</feed>
