<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Выбор случайного файла каждые 10 минут]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=15583&amp;type=atom" />
	<updated>2020-08-11T12:32:34Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15583</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор случайного файла каждые 10 минут]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141609#p141609" />
			<content type="html"><![CDATA[<p>Да, можно и через RegExMatch:<br /></p><div class="codebox"><pre><code>Files := []
Loop, Files, D:\MyFolder\*, F
   if (A_LoopFileExt ~= &quot;i)^(doc|rtf)$&quot;)
      Files.Push(A_LoopFilePath)
Random, rand, 1, Files.Count()
MsgBox, % randomFile := Files[rand]</code></pre></div><p>Но проще так:<br /></p><div class="codebox"><pre><code>Files := []
Loop, Files, D:\MyFolder\*, F
   if A_LoopFileExt in doc,rtf
      Files.Push(A_LoopFilePath)
Random, rand, 1, Files.Count()
MsgBox, % randomFile := Files[rand]</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-08-11T12:32:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141609#p141609</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор случайного файла каждые 10 минут]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141600#p141600" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong></p><p>Ещё нужно через RegExMatch шаблон показать - и уникальная тема, на которую можно в дальнейшем ссылку кидать.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2020-08-10T20:33:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141600#p141600</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор случайного файла каждые 10 минут]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141593#p141593" />
			<content type="html"><![CDATA[<p>Понятно. Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[димитрий2]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39571</uri>
			</author>
			<updated>2020-08-10T14:44:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141593#p141593</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор случайного файла каждые 10 минут]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141588#p141588" />
			<content type="html"><![CDATA[<p>Или так:<br /></p><div class="codebox"><pre><code>Files := []
for k, ext in [&quot;doc&quot;, &quot;rtf&quot;] {
   Loop, Files, D:\MyFolder\*.%ext%, F
      Files.Push(A_LoopFilePath)
}
Random, rand, 1, Files.Count()
MsgBox, % randomFile := Files[rand]</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-08-10T09:20:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141588#p141588</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор случайного файла каждые 10 минут]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141584#p141584" />
			<content type="html"><![CDATA[<p>Что тут сложного?</p><div class="codebox"><pre><code>ext := &quot;doc&quot;
ext1 := &quot;rtf&quot;

Files := []
Loop, Files, D:\MyFolder\*.%ext%, F
   Files.Push(A_LoopFilePath)

Loop, Files, D:\MyFolder\*.%ext1%, F
   Files.Push(A_LoopFilePath)

Random, rand, 1, Files.Count()
MsgBox, % randomFile := Files[rand]</code></pre></div>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2020-08-09T21:20:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141584#p141584</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор случайного файла каждые 10 минут]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141583#p141583" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong> а там же не одно расширение, а несколько.<br />Остальные расширения - как в код вписать ?</p>]]></content>
			<author>
				<name><![CDATA[димитрий2]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39571</uri>
			</author>
			<updated>2020-08-09T21:03:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141583#p141583</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор случайного файла каждые 10 минут]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141581#p141581" />
			<content type="html"><![CDATA[<p>Случайный файл с конкретным расширением можно так выбрать:<br /></p><div class="codebox"><pre><code>ext := &quot;doc&quot;
Files := []
Loop, Files, D:\MyFolder\*.%ext%, F
   Files.Push(A_LoopFilePath)
Random, rand, 1, Files.Count()
MsgBox, % randomFile := Files[rand]</code></pre></div><p>А уж как это делать каждые 10 минут попробуйте сами догадаться.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-08-09T20:35:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141581#p141581</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор случайного файла каждые 10 минут]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141562#p141562" />
			<content type="html"><![CDATA[<p>Не подскажете - как&nbsp; определить переменную не точным адресом файла, а случайным адресом из конкретной папки (с выбором расширений - либо doc либо rtf) - с переопределением этой переменной каждые 10минут ?</p><p>Переменная с конкретным определением адреса -&nbsp; это sDocum := &quot;F:\-34 420\статья.rtf&quot;</p>]]></content>
			<author>
				<name><![CDATA[димитрий2]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39571</uri>
			</author>
			<updated>2020-08-09T16:43:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141562#p141562</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор случайного файла каждые 10 минут]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141543#p141543" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong> - да, выбрать случайный файл из указанной папки &quot;F:\-34 420&quot; с расширением либо doc либо rtf (там просто много и других расширений)</p>]]></content>
			<author>
				<name><![CDATA[димитрий2]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39571</uri>
			</author>
			<updated>2020-08-08T16:10:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141543#p141543</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор случайного файла каждые 10 минут]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141539#p141539" />
			<content type="html"><![CDATA[<p>Не совсем понятно что нужно в итоге: случайный файл из папки выбрать?</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2020-08-08T11:14:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141539#p141539</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Выбор случайного файла каждые 10 минут]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141535#p141535" />
			<content type="html"><![CDATA[<p>Доброго времени, друзья.</p><p>Не подскажете - как&nbsp; определить переменную не точным адресом файла, а случайным адресом из конкретной папки (с выбором расширений - либо doc либо rtf) - с переопределением этой переменной каждые 10минут ?</p><p>Переменная с конкретным определением адреса -&nbsp; это sDocum := &quot;F:\-34 420\статья.rtf&quot;</p>]]></content>
			<author>
				<name><![CDATA[димитрий2]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39571</uri>
			</author>
			<updated>2020-08-07T22:22:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141535#p141535</id>
		</entry>
</feed>
