<?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=13197&amp;type=atom" />
	<updated>2017-11-14T03:48:58Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13197</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: повтор рандома]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=121139#p121139" />
			<content type="html"><![CDATA[<p>Если заранее известно сколько в массиве ключей то ваш вариант можно слегка модифицировать просто, если нет, то arr.MaxIndex() укажет количество этих ключей. Схема такова: заворачиваете весь код в цикл, когда i достигает максимального числа (в вашем случае 10), все сбрасывается, а вместо return continue прописываете - эта команда запускает новую итерацию цикла немедленно. Все команды goto random на continue замените, кроме последней - там не обязательно, цикл сам начнет новую итерацию.</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2017-11-14T03:48:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=121139#p121139</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: повтор рандома]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=121138#p121138" />
			<content type="html"><![CDATA[<p>Здравствуйте Ув. пользователя форума. Вот скрипт, работает очень хорошо.</p><div class="codebox"><pre><code>

arr := [], i := 0
Action := [&quot;text1&quot;, &quot;text2&quot;, &quot;text3&quot;, &quot;text4&quot;, &quot;text5&quot;
    , &quot;text6&quot;, &quot;text7&quot;, &quot;text8&quot;, &quot;text9&quot;, &quot;text10&quot;]
8::Pause
9::Reload   
0::
Random: 
    If (i = 10)  
    {
        arr := [], i := 0, r := &quot;&quot;
        Return
    }    
    Random, rand, 1, 10
    If arr[rand]
        GoTo Random
    arr[rand] := 1, i++

Send {Numpad1}
Sleep 100
Send {Numpad2}
Sleep 100
Send {Numpad3}
Sleep 100

Send {Click x, y}
Sleep 5000
Send {Click x, y}
Sleep 5000
Send {Click x, y}
Sleep 5000

    SendInput % Action[rand] &quot;`n&quot; 
Sleep 5000
Send {Click x, y}
Sleep 5000
Send {Click x, y}
Sleep 30000
Send {Click x, y}
Sleep 12000

Send {Numpad1}
Sleep 100
Send {Numpad2}
Sleep 100
Send {Numpad3}
Sleep 100

Random, Rand, 1800000, 2400000
Random, Rand1, 93000, 399000
Rand2 := Rand + Rand1
sleep % Rand2

    GoTo Random 

</code></pre></div><p>10 слов в рандомном порядке&nbsp; вводит в нужное место без повторов и когда закончатся слова останавливаться. Как сделать, что бы этот процесс который я описал ранние, постоянно повторялся. То есть,&nbsp; сначала 10 слов по очереди в рандоме по вставляло, когда вставило последнее слово, не остановилось, а сделало тоже самое с 10 словами и так постоянно, я с Loop побывал, что то не выходит, может я не туда вставлял. Желательно пример, если не трудно.</p>]]></content>
			<author>
				<name><![CDATA[kpweby]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38394</uri>
			</author>
			<updated>2017-11-14T00:07:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=121138#p121138</id>
		</entry>
</feed>
