<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Буквенный Random]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=8279&amp;type=atom" />
	<updated>2013-05-05T18:35:45Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8279</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Буквенный Random]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71918#p71918" />
			<content type="html"><![CDATA[<p>Или так:<br /></p><div class="codebox"><pre><code>
1::
   Random, Rand, 1072, 1103
   Send % Chr(Rand)
   Return
</code></pre></div><p>----</p><p>Хмм... Про &quot;Ё&quot; забыл:<br /></p><div class="codebox"><pre><code>1::
   Random, Rand, 1072, 1104
   Send % Rand = 1104 ? &quot;ё&quot; : Chr(Rand)
   Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-05-05T18:35:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71918#p71918</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Буквенный Random]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71912#p71912" />
			<content type="html"><![CDATA[<p>Или так: <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /></p><div class="codebox"><pre><code>1:: Send, % SubStr(&quot;абвгдеёжзийклмнопрстуфхцчшщъыьэюя&quot;, Rand(1,33), 1)

Rand(min,max)
{
   Random, r, min, max
   Return r
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2013-05-05T16:33:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71912#p71912</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Буквенный Random]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71911#p71911" />
			<content type="html"><![CDATA[<p>Сам бы не догадался <img src="//forum.script-coding.com/img/smilies/sad.png" width="15" height="15" /> Спасибо!</p>]]></content>
			<author>
				<name><![CDATA[Nox_The_Great]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30084</uri>
			</author>
			<updated>2013-05-05T14:33:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71911#p71911</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Буквенный Random]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71909#p71909" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>MyArray := Array(&quot;а&quot;, &quot;б&quot;, &quot;В&quot;, &quot;г&quot;, &quot;д&quot;, &quot;е&quot;, &quot;ё&quot;, &quot;ж&quot;, &quot;з&quot;, &quot;и&quot;, &quot;й&quot;, &quot;к&quot;, &quot;л&quot;, &quot;м&quot;, &quot;н&quot;, &quot;о&quot;, &quot;п&quot;, &quot;р&quot;, &quot;с&quot;, &quot;т&quot;, &quot;у&quot;, &quot;ф&quot;, &quot;х&quot;, &quot;ц&quot;, &quot;ч&quot;, &quot;ш&quot;, &quot;щ&quot;, &quot;ъ&quot;, &quot;ы&quot;, &quot;ь&quot;, &quot;э&quot;, &quot;ю&quot;, &quot;я&quot;)
Return

SC01e::
Random, r, 1, 33
Send, % MyArray[r]
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2013-05-05T13:21:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71909#p71909</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Буквенный Random]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71905#p71905" />
			<content type="html"><![CDATA[<p>Всё таки заметили. Я в курсе, что буквы &quot;ё&quot; нет - это для удобства (потом добавлю). А по сути дела что-то можно сказать?</p>]]></content>
			<author>
				<name><![CDATA[Nox_The_Great]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30084</uri>
			</author>
			<updated>2013-05-05T11:00:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71905#p71905</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Буквенный Random]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71903#p71903" />
			<content type="html"><![CDATA[<p>Букву ё пропустили. <img src="//forum.script-coding.com/img/smilies/sad.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2013-05-05T10:34:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71903#p71903</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Буквенный Random]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71901#p71901" />
			<content type="html"><![CDATA[<p>Суть в следующем:<br />В AHK ест замечательная команда как Random, которая генерирует случайное число. Но проблема в том, что она генерирует ТОЛЬКО число. Мне же нужен random буквенный. Ничего лучше сопоставления сгенерированного числа и буквы мне в голову не пришло:<br /></p><div class="codebox"><pre><code>SC01e:: 
random, r, 1, 32
if r &gt; 0
{
 if r &lt; 9
 {
  if r = 1
  {
   send а
   exit
  }
  if r = 2
  {
   send б
   exit
  }
  if r = 3
  {
   send в
   exit
  }
  if r = 4
  {
   send г
   exit
  }
  if r = 5
  {
   send д
   exit
  }
  if r = 6
  {
   send е
   exit
  }
  if r = 7
  {
   send ж
   exit
  }
  if r = 8
  {
   send з
   exit
  }
 }
}
if r &gt; 8
{
 if r &lt; 17
 {
  if r = 9
  {
   send и
   exit
  }
  if r = 10
  {
   send й
   exit
  }
  if r = 11
  {
   send к
   exit
  }
  if r = 12
  {
   send л
   exit
  }
  if r = 13
  {
   send м
   exit
  }
  if r = 14
  {
   send н
   exit
  }
  if r = 15
  {
   send о
   exit
  }
  if r = 16
  {
   send п
   exit
  }
 }
}
if r &gt; 16
{
 if r &lt; 26
 {
  if r = 17
  {
   send р
   exit
  }
  if r = 18
  {
   send с
   exit
  }
  if r = 19
  {
   send т
  exit
  }
  if r = 20
  {
   send у
   exit
  }
  if r = 21
  {
   send ф
   exit
  }
  if r = 22
  { 
   send х
   exit
  }
  if r = 23
  {
   send ц
   exit
  }
  if r = 24
  {
   send ч
   exit
  }
  if r = 25
  {
   send ш
   exit
  }
 }
}
if r &gt; 25
{
 if r &lt; 33
 { 
  if r = 26
  {
   send щ
   exit
  }
  if r = 27
  {
   send ь
   exit
  }
  if r = 28
  {
   send ы
   exit
  }
  if r = 29
  {
   send ъ
   exit
  }
  if r = 30
  {
   send э
   exit
  }
  if r = 31
  {
   send ю
   exit
  }
  if r = 32
  {
   send я
   exit
  }
 }
}
return</code></pre></div><p>Но сие составляет аж 187 строк. Подскажите пожалуйста менее громоздкий и более быстрый метод генерации случайного символа.</p>]]></content>
			<author>
				<name><![CDATA[Nox_The_Great]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30084</uri>
			</author>
			<updated>2013-05-05T10:21:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71901#p71901</id>
		</entry>
</feed>
