<?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=16265&amp;type=atom" />
	<updated>2021-04-17T16:34:01Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16265</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Доработка скрипта редактирования файлов]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147398#p147398" />
			<content type="html"><![CDATA[<p><em>FileSelectFile</em> - команда для выбора файла. <em>FileSelectFolder</em> - команда для выбора папки.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2021-04-17T16:34:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147398#p147398</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Доработка скрипта редактирования файлов]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147397#p147397" />
			<content type="html"><![CDATA[<p>Спасибо, правильно ли я понял что надо заменить данную часть кода?<br /></p><div class="codebox"><pre><code>preselect=%fd1%
FileSelectFile, FL1a, 3,%preselect%, Choose file:, %extensions2%
If FL1a =
   ExitApp
new:=&quot;&quot;
SplitPath,fl1a, name, dir, ext, name_no_ext, drive
If Ext In %extensions1%</code></pre></div><p>Начнем с малого)</p>]]></content>
			<author>
				<name><![CDATA[Langeles]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33879</uri>
			</author>
			<updated>2021-04-17T16:15:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147397#p147397</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Доработка скрипта редактирования файлов]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147367#p147367" />
			<content type="html"><![CDATA[<p>Есть команда FileSelectFolder, и далее перебираете файлы в ней через Loop, Files.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-04-16T10:13:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147367#p147367</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Доработка скрипта редактирования файлов]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147361#p147361" />
			<content type="html"><![CDATA[<p>Всем привет. У меня имеется скрипт, который переделывает текстовый файл заменяя в нем символы. Он переделывает лишь один файл. Подскажите пожалуйста каким образом его доработать чтобы он переделывал всю папку с файлами. Спасибо</p><div class="codebox"><pre><code>#Warn
#NoEnv
SendMode, Input
SetWorkingDir, %A_ScriptDir%
extensions1:=&quot;ahk,bat,ini,csv,bas,log,txt&quot;                    ;- open these with notepad
extensions2:=&quot;*.ahk;*.bat;*.ini;*.csv;*.bas;*.log;*.txt&quot;   
fd1:=&quot;C:\LOGS&quot;
;-------------------------
preselect=%fd1%
FileSelectFile, FL1a, 3,%preselect%, Choose file:, %extensions2%
If FL1a =
   ExitApp
new:=&quot;&quot;
SplitPath,fl1a, name, dir, ext, name_no_ext, drive
If Ext In %extensions1%
 {
 new=%fd1%\%name_no_ext%_%a_now%.%ext%
 fileread,aa1,%fl1a%
 stringreplace,aa2,aa1,$,¥,all
 stringreplace,aa2,aa2,Value &#039;,Coins,all
 


Fileappend,%aa2%,%new%,utf-8
 runwait,notepad %new%    ;- open converted new file xy_a_now.txt
 }
run,%fd1%                 ;- open folder see files 
return
;=============================================================
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Langeles]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33879</uri>
			</author>
			<updated>2021-04-16T06:16:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147361#p147361</id>
		</entry>
</feed>
