<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: SetKeyDelay или SetTimer?]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=7621&amp;type=atom" />
	<updated>2012-09-27T20:04:09Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=7621</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SetKeyDelay или SetTimer?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=64287#p64287" />
			<content type="html"><![CDATA[<p>Отлично, работает!!! Спасибо большое за помощь, тему можно закрывать!</p>]]></content>
			<author>
				<name><![CDATA[letrixx]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28711</uri>
			</author>
			<updated>2012-09-27T20:04:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=64287#p64287</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SetKeyDelay или SetTimer?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=64218#p64218" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>F1::
    Settimer, Send_alt+0, % 1000*60*5
    SetTimer, ImageCheck, 100
    return

ImageCheck:
    PixelSearch x, y, 1508, 81, 1508, 96, 0xD6CFCE, 5, Fast
    if (ErrorLevel &gt; 0)
    {
        PixelSearch x, y, 3, 25, 1675, 1048, 0x9bbd9f, 5, Fast
        if (ErrorLevel &gt; 0)
        {
            Send, {F2}
            sleep, 1000
            return
        }
        Send, {F4}
        sleep, 50
        Click %x% %y%
        sleep, 100
        return
    }

    sleep, 100
    Send !0
    sleep, 5000
    click 608, 285
    sleep, 1000
    click 1080, 274
    sleep, 1000
    Send, {Enter}
    sleep, 1000
    Send, {Enter}
    sleep, 1000
    return

F3::Pause

Send_alt+0:
    Send !{0}
    return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-09-25T20:36:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=64218#p64218</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SetKeyDelay или SetTimer?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=64217#p64217" />
			<content type="html"><![CDATA[<p>А можно, пожалуйста, уточнить куда конкретно в МОЙ код вставить ВАШ код? Я чайник... Было бы замечательно если бы Вы прямо в моём коде это сделали...</p>]]></content>
			<author>
				<name><![CDATA[letrixx]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28711</uri>
			</author>
			<updated>2012-09-25T19:38:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=64217#p64217</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SetKeyDelay или SetTimer?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=64207#p64207" />
			<content type="html"><![CDATA[<p>Ваш вопрос остаётся без ответа, потому как он обрамлён излишними узкоспециализированными подробностями.<br /></p><div class="quotebox"><blockquote><p>каждые 5 минут независимо от скрипта клацалось Alt+0</p></blockquote></div><p>Значит при запуске выполнения скрипта нужно включить таймер, который будет обращаться к некой метке каждые 5 минут.<br />«При запуске» подразумевает либо в секции автовыполнения, либо в начале подпрограммы горячей клавиши, «запускающей» выполнение требуемых действий.<br />Например:<br /></p><div class="codebox"><pre><code>Settimer, Send_alt+0, % 1000*60*5
return ; конец секции автовыполнения

Send_alt+0:
    Send !{0}
    return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-09-25T14:13:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=64207#p64207</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: SetKeyDelay или SetTimer?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=64162#p64162" />
			<content type="html"><![CDATA[<p>Уважаемые форумчане! <br />Столкнулся с таковой проблемой: использую PixelSearch для поиска по цвету монстра на экране и последующего его убийства, но когда монстр стоит за какой-либо преградой (будь-то дом, забор и т.д.) мой персонаж наводится на него, пытается атаковать, но ему это не удается и он бесконечное время стоит на месте... Возможно ли как-то сделать так, чтобы в данных ситуациях мой персонаж нажимал, к примеру, F2 и телепортировался? <br />Если же нет, подскажите, куда вставить часть скрипта, чтобы, к примеру, каждые 5 минут независимо от скрипта клацалось Alt+0? Если я не ошибаюсь это делается либо через SetKeyDelay, либо через SetTimer? Ниже привожу свой скрипт.<br /></p><div class="codebox"><pre><code>F1::

SetTimer, ImageCheck, 100
return

ImageCheck:

{
PixelSearch x, y, 1508, 81, 1508, 96, 0xD6CFCE, 5, Fast
    if ( ErrorLevel &gt; 0 )
{
PixelSearch x, y, 3, 25, 1675, 1048, 0x9bbd9f, 5, Fast
    if ( ErrorLevel &gt; 0 )
        {
        ;если ErrorLevel &gt; 0
        Send, {F2}
sleep, 1000
        return
        }
Send, {F4}
sleep, 50
Click %x% %y%
sleep, 100
return
}
sleep, 100
Send !0
sleep, 5000
click 608, 285
sleep, 1000
click 1080, 274
sleep, 1000
Send, {Enter}
sleep, 1000
Send, {Enter}
sleep, 1000
return

}

F3::Pause</code></pre></div><p>Заранее благодарен!!!</p>]]></content>
			<author>
				<name><![CDATA[letrixx]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28711</uri>
			</author>
			<updated>2012-09-24T16:52:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=64162#p64162</id>
		</entry>
</feed>
