<?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="http://forum.script-coding.com/extern.php?action=feed&amp;tid=13093&amp;type=atom" />
	<updated>2017-10-19T03:24:00Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=13093</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение текстового файла и символов в нём.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=120195#p120195" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, вы гений просто! Спасибо!</p>]]></content>
			<author>
				<name><![CDATA[sanniauto]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38823</uri>
			</author>
			<updated>2017-10-19T03:24:00Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=120195#p120195</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение текстового файла и символов в нём.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=120194#p120194" />
			<content type="html"><![CDATA[<p>Ужасный код.<br />Можно так:<br /></p><div class="codebox"><pre><code>String := 12345678, Start := 1, Length := 5

loop
{
   if ((NewString := SubStr(String, Start, Length)) = &quot;&quot;)
      break
   Send % NewString &quot;{Enter}&quot;
   Start+=Length
   Sleep 2000
}
msgbox done</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-10-19T03:16:22Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=120194#p120194</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение текстового файла и символов в нём.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=120193#p120193" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, хм, тут он просто по Loop&#039;у вставляет все строки, но задержки нету, между вставкой каждой строки.</p>]]></content>
			<author>
				<name><![CDATA[sanniauto]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38823</uri>
			</author>
			<updated>2017-10-19T03:01:48Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=120193#p120193</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение текстового файла и символов в нём.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=120192#p120192" />
			<content type="html"><![CDATA[<p>Вот полный код в общем:<br /></p><div class="codebox"><pre><code>String = 12345678

    Loop, Parse, String
{
   if (A_Index &gt;= 0 and A_Index  &lt;= 5)
d .= A_LoopField
   if (A_Index &gt;= 6 and A_Index  &lt;= 10)
e .= A_LoopField
   if (A_Index &gt;= 11 and A_Index  &lt;= 15)
w .= A_LoopField
   if (A_Index &gt;= 16 and A_Index  &lt;= 20)
u .= A_LoopField
    }
    
SendInput, % d &quot;{Enter}&quot;
Sleep 2000
SendInput, % e &quot;{Enter}&quot;
Sleep 2000
SendInput, % w &quot;{Enter}&quot;
Sleep 2000
SendInput, % u &quot;{Enter}&quot;
Sleep 2000
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[sanniauto]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38823</uri>
			</author>
			<updated>2017-10-19T02:53:02Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=120192#p120192</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение текстового файла и символов в нём.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=120191#p120191" />
			<content type="html"><![CDATA[<p>А всё сообразил, тут тогда поможет код <strong>svoboden</strong>.<br /></p><div class="codebox"><pre><code>String = zxcvbnmasdfgjqwert

    Loop, Parse, String
{
   if (A_Index &gt;= 0 and A_Index  &lt;= 5)
d .= A_LoopField
   if (A_Index &gt;= 6 and A_Index  &lt;= 10)
e .= A_LoopField
   if (A_Index &gt;= 11 and A_Index  &lt;= 15)
w .= A_LoopField
   if (A_Index &gt;= 16 and A_Index  &lt;= 20)
u .= A_LoopField
    }
    
n := d &quot;`n&quot; e &quot;`n&quot; w &quot;`n&quot; u
    
MsgBox % n</code></pre></div><p>Тут он сможет посылать каждую строку с задержкой 2000.</p>]]></content>
			<author>
				<name><![CDATA[sanniauto]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38823</uri>
			</author>
			<updated>2017-10-19T02:47:24Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=120191#p120191</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение текстового файла и символов в нём.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=120190#p120190" />
			<content type="html"><![CDATA[<p>Сможет, если вы будете посылать ее в цикле, а потом ставить задержку.<br /></p><div class="codebox"><pre><code>loop 5
{
   Send % A_Index
   Sleep 2000
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-10-19T02:45:27Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=120190#p120190</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение текстового файла и символов в нём.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=120189#p120189" />
			<content type="html"><![CDATA[<p>То есть каждая строка не сможет вставляться с задержкой 2000?</p>]]></content>
			<author>
				<name><![CDATA[sanniauto]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38823</uri>
			</author>
			<updated>2017-10-19T02:42:12Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=120189#p120189</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение текстового файла и символов в нём.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=120188#p120188" />
			<content type="html"><![CDATA[<p>И не получится.<br />Посылайте каждую строку в цикле.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-10-19T02:41:07Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=120188#p120188</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение текстового файла и символов в нём.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=120187#p120187" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, это я просто поэкспериментировал, у меня не получилось.</p>]]></content>
			<author>
				<name><![CDATA[sanniauto]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38823</uri>
			</author>
			<updated>2017-10-19T02:35:48Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=120187#p120187</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение текстового файла и символов в нём.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=120185#p120185" />
			<content type="html"><![CDATA[<p>А с чего вы взяли, что так можно ставить задержку:<br />Send Sleep 1000?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-10-19T02:29:36Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=120185#p120185</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение текстового файла и символов в нём.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=120183#p120183" />
			<content type="html"><![CDATA[<p>Вот я попробовал сделать, у меня получилось такое:<br /></p><div class="codebox"><pre><code>String = zxcvbnmasdfgjqweryuizxcvbnmasdfgjqweryuiasdfgdf
w := 1

Output := StrLen(String)
n := Output / 5

loop % n {
a := SubStr(String, w, 5)
w += 5
d .= a &quot;{Enter}&quot; &quot;{sleep 3000}&quot;
}

SendInput, % d

</code></pre></div><p>Или:<br /></p><div class="codebox"><pre><code>String := &quot;zxcvbnmasdfgjqwerty&quot;, n := 5
SendInput % RegexReplace(String, &quot;.{&quot; n &quot;}&quot;, &quot;$0{Enter}{sleep 3000}&quot;)</code></pre></div><p>Тут он вставляет первую переменную, нажимает Enter, ждёт 3 секунды, а затем он вставляет в другие строчки следующие переменные, с Enter, но без Sleep 3000, как сделать, чтобы Sleep 3000 применялось к каждой строчке?</p>]]></content>
			<author>
				<name><![CDATA[sanniauto]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38823</uri>
			</author>
			<updated>2017-10-19T01:25:34Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=120183#p120183</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение текстового файла и символов в нём.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=120182#p120182" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, <strong>Svoboden</strong>, спасибо за помощь, код правда получился хороший. Но у меня еще возникла одна проблема:<br />Можно ли сделать так, чтобы каждая строка в коде, которая выводится в Msgbox, короче так:<br />В общем должно получиться так:<br />SendInput, нажатие F6 текст 1-ой строки Нажатие Enter, задержка 2 секунды, затем след. строка.<br />SendInput, нажатие F6 текст 2-ой строки Нажатие Enter задержка 2 секунды, затем след. строка.<br />SendInput, нажатие F6 текст 3-ой строки Нажатие Enter задержка 2 секунды, затем след. строка.<br />SendInput, нажатие F6 текст 4-ой строки Нажатие Enter задержка 2 секунды, затем след. строка.<br />И так далее... все последующиеся..<br />Спасибо заранее.</p>]]></content>
			<author>
				<name><![CDATA[sanniauto]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38823</uri>
			</author>
			<updated>2017-10-19T00:41:17Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=120182#p120182</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение текстового файла и символов в нём.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=120181#p120181" />
			<content type="html"><![CDATA[<p>Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[sanniauto]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38823</uri>
			</author>
			<updated>2017-10-19T00:36:24Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=120181#p120181</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение текстового файла и символов в нём.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=120180#p120180" />
			<content type="html"><![CDATA[<p>Есть еще такой вариант:<br /></p><div class="codebox"><pre><code>String = zxcvbnmasdfgjqweryuizxcvbnmasdfgjqweryuiasdfgdf
w := 1

Output := StrLen(String)
n := Output / 5

loop % n + 1 {
a := SubStr(String, w, 5)
w += 5
d .= a &quot;`n&quot;
}

MsgBox % d</code></pre></div>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2017-10-19T00:01:40Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=120180#p120180</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение текстового файла и символов в нём.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=120179#p120179" />
			<content type="html"><![CDATA[<p><strong>svoboden</strong>, <strong>Malcev</strong>, спасибо вам за помощь! Как раз то, что я хотел!</p>]]></content>
			<author>
				<name><![CDATA[sanniauto]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38823</uri>
			</author>
			<updated>2017-10-18T23:44:17Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=120179#p120179</id>
		</entry>
</feed>
