<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Набор текста из html файла, с интервалом]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10859&amp;type=atom" />
	<updated>2015-08-15T12:17:44Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10859</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Набор текста из html файла, с интервалом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96465#p96465" />
			<content type="html"><![CDATA[<p>Что то типа этого?<br /></p><div class="codebox"><pre><code>SetKeyDelay, 10, 10
IF !FileExist(&quot;AutoHotkey.html&quot;)
    UrlDownloadToFile, http://www.script-coding.com/AutoHotkeyTranslation.html , AutoHotkey.html
    
FileRead text, AutoHotkey.html
    Run notepad.exe
    WinWait ahk_exe notepad.exe
    hwnd_notepad := WinActive(&quot;A&quot;)

for n, element in Search_Items(text,&quot;&lt;LI&gt;&lt;a href=&quot;&quot;.+&quot;&quot;&gt;(.+)&lt;/a&gt;&quot;)
    {
    Random,wait,1000,5000
    sleep %wait%
    if !WinExist(&quot;ahk_id &quot; hwnd_notepad)
        ExitApp
    ControlSendRaw Edit1,%element%`n,ahk_id %hwnd_notepad%
    }
    
Search_Items(text,RegEx){
    finds:=[],pos:=1
    While pos:= RegExMatch(text,RegEx,m,StrLen(m)+pos)
        finds.Insert(m1)
    return finds
}

Esc::ExitApp</code></pre></div><p>Скрипт будет печатать в блокноте имена под тем с <a href="http://www.script-coding.com/AutoHotkeyTranslation.html">русской вики ahk</a>.<br />шаблон для этого: </p><div class="codebox"><pre><code>&lt;LI&gt;&lt;a href=&quot;&quot;.+&quot;&quot;&gt;(.+)&lt;/a&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-08-15T12:17:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96465#p96465</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Набор текста из html файла, с интервалом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96363#p96363" />
			<content type="html"><![CDATA[<p><strong>Ganya</strong>&nbsp; Вам <a href="http://forum.script-coding.com/viewtopic.php?id=5421">сюда</a> , оформите тему правильно. Иначе вам никто не ответит.</p>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2015-08-09T19:19:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96363#p96363</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Набор текста из html файла, с интервалом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96360#p96360" />
			<content type="html"><![CDATA[<p>Добрый день.<br />Интересует вопрос, можно ли заставить AHK печатать указанный текст, который содержится в каком то указанном файле (в моем случает ето html код).</p><p>При этом существует ли возможность, печатать текст например с рандомным интервалом от 1 до 5 секунд, и что бы раз в час, скрипт останавливался на 15 минут ?</p>]]></content>
			<author>
				<name><![CDATA[ganya]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32694</uri>
			</author>
			<updated>2015-08-09T17:08:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96360#p96360</id>
		</entry>
</feed>
