<?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=8153&amp;type=atom" />
	<updated>2013-03-24T16:39:58Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8153</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Нажатие кнопок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70743#p70743" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>И разобратся тебе лень, и сформулировать...</p></blockquote></div><p>Уже разобрался <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[hifana12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29817</uri>
			</author>
			<updated>2013-03-24T16:39:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70743#p70743</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Нажатие кнопок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70697#p70697" />
			<content type="html"><![CDATA[<p>И разобратся тебе лень, и сформулировать...</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-03-24T00:04:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70697#p70697</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Нажатие кнопок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70681#p70681" />
			<content type="html"><![CDATA[<p>Помогите добавить в начало цикла&nbsp; 10 прокруток&nbsp; вниз и потом 5 прокруток вверх </p><p>Вот сам код:</p><div class="codebox"><pre><code>F1:: 
    Tick := 60
    Loop 
    {   
        StartLoop := A_TickCount
        Loop
        { 
            sleep, 80   
            PixelSearch x, y, 600, 81, 600, 96, 0xFF0000, 5, Fast
            if ( ErrorLevel &gt; 0 )
            {
                PixelSearch x, y, 3, 25, 1675, 1048, 0xFF0000, 5, Fast
                if ( ErrorLevel &gt; 0 )
                {
                    ;если ErrorLevel &gt; 0
                    Send, {F2}
                    sleep, 1000
                    Continue
                } 
                Send, {F3}
                sleep, 5
                Click %x% %y%  
            }
        }    Until ( A_TickCount - StartLoop ) / 1000 &gt;= Tick
        А тут 10 прокруток  вниз и 10 прокруток вверх 
        Send @storage
        sleep 400
        Send {Enter}
        sleep 400
        Click down, left, 56, 219
        sleep, 20
        Click up right, left, 424, 205
        sleep 20
        Send {Enter}
        sleep, 100
        Click down, left, 56, 219
        sleep, 20
        Click up right, left, 424, 205
        sleep 20
        Send {Enter}
        sleep, 100
        Click down, left, 56, 219
        sleep, 20
        Click up right, left, 424, 205
        sleep 20
        Send {Enter}
        Click down, left, 56, 219
        sleep, 20
        Click up right, left, 424, 205
        sleep 20
        Send {Enter}
        sleep, 100
        Click down, left, 56, 219
        sleep, 20
        Click up right, left, 424, 205
        sleep 20
        Send {Enter}
        sleep, 100
        Click down, left, 56, 219
        sleep, 20
        Click up right, left, 424, 205
        sleep 20
        Send {Enter}
        sleep 100
        MouseClick, left, 512, 377  

    }

F8::Pause</code></pre></div>]]></content>
			<author>
				<name><![CDATA[hifana12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29817</uri>
			</author>
			<updated>2013-03-23T18:16:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70681#p70681</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Нажатие кнопок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70402#p70402" />
			<content type="html"><![CDATA[<p>В связи с вопросом на почту и тем что на лицо есть некоторое не допонимание решения вопроса, осмелюсь предложить более наглядное решение разбитое на подпрограммы, запускающиеся из управляющей, и простой в понимании и редактировании:<br /></p><div class="codebox"><pre><code>

F1:: 
    Loop  { 
        StartLoop := A_TickCount , Tick := 3    ; (Tick - секунды) В течении скольки секунд повторно запукать &quot;PR_1&quot;
        While, ( A_TickCount - StartLoop ) / 1000 &lt; Tick
            Gosub, PR_1
        Loop 10    ; 10 - Сколько раз повторно запукать &quot;PR_2&quot;
            Gosub, PR_2
        Gosub, PR_3    ; 1 раз запустить &quot;PR_3&quot;
    }
    Return

PR_1: 
    ToolTip % &quot; Подпрограмма: PR_1 `n`n Вызов №  &quot; A_Index  &quot;`n`n Осталось секунд  &quot; Round( Tick-( A_TickCount - StartLoop ) / 1000, 1)
    sleep, 100
    Return    
    
PR_2: 
    ToolTip % &quot; Подпрограмма: PR_2 `n`n Вызов №  &quot; A_Index
    sleep, 200
    Return

PR_3: 
    ToolTip % &quot; Подпрограмма: PR_3 `n`n Эта подпрограмма`nвыполняется только один раз`n и в конце общего цикла&quot;
    sleep, 2000
    Return

Esc::
    ExitApp 

</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-03-17T18:04:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70402#p70402</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Нажатие кнопок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70400#p70400" />
			<content type="html"><![CDATA[<p>Напишу если что.</p>]]></content>
			<author>
				<name><![CDATA[hifana12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29817</uri>
			</author>
			<updated>2013-03-17T16:46:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70400#p70400</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Нажатие кнопок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70399#p70399" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Спасибо огромное!<br />Аську можно?</p></blockquote></div><p>Добавил комментариев если что-то не понятно.<br />Аськи нет, напишите на почту через профиль форума.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-03-17T16:28:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70399#p70399</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Нажатие кнопок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70398#p70398" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><div class="codebox"><pre><code>

F1:: 
    Tick := 600  ; Tick это секунды 
    Loop 
    {   
        StartLoop := A_TickCount
        Loop 
        { 
            sleep, 100     ; Интервал этого цикла
            PixelSearch x, y, 1508, 81, 1508, 96, 0xFF0000, 5, Fast
            if ( ErrorLevel &gt; 0 )
            {
                PixelSearch x, y, 3, 25, 1675, 1048, 0xFF0000, 5, Fast
                if ( ErrorLevel &gt; 0 )
                {
                    ;если ErrorLevel &gt; 0
                    Send, {F2}
                    sleep, 1000
                    Continue
                } 
                Send, {F4}
                sleep, 50
                Click %x% %y%  
            }
        }    Until ( A_TickCount - StartLoop ) / 1000 &gt;= Tick
        
        Send @storage
        sleep 300
        Send {Enter}
        sleep 400
        Click down, left, 336, 219
        Click up right, left, 137, 166
        sleep 50
        Send 80
        sleep 10
        Send {Enter}
        sleep 100
        MouseClick, left, 520, 418  
    }
</code></pre></div><p><span style="color: blue">Отредактировано serzh82saratov (Сегодня 20:10:58)</span><br />Исправил свои ошибки в отступах. И вам советую соблюдать <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p></blockquote></div><br /><br /><p>Спасибо огромное!<br />Аську можно?</p>]]></content>
			<author>
				<name><![CDATA[hifana12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29817</uri>
			</author>
			<updated>2013-03-17T16:23:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70398#p70398</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Нажатие кнопок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70397#p70397" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>

F1:: 
    Tick := 600  ; Интервал перехода к 2 подпрограмме (600 - секунды)
    Loop      ; Общий цикл
    {   
        StartLoop := A_TickCount
        Loop      ; Цикл выполнения 1 подпрограммы
        { 
            sleep, 100     ; Интервал выполнения 1 подпрограммы
            PixelSearch x, y, 1508, 81, 1508, 96, 0xFF0000, 5, Fast
            if ( ErrorLevel &gt; 0 )
            {
                PixelSearch x, y, 3, 25, 1675, 1048, 0xFF0000, 5, Fast
                if ( ErrorLevel &gt; 0 )
                {
                    ;если ErrorLevel &gt; 0
                    Send, {F2}
                    sleep, 1000
                    Continue     ; Не выполняя дальше начинаем цикл выполнения 1 подпрограммы снова
                } 
                Send, {F4}
                sleep, 50
                Click %x% %y%     ; Далее начинаем цикл выполнения 1 подпрограммы снова
            }
        }    Until ( A_TickCount - StartLoop ) / 1000 &gt;= Tick     ; Если прошло более 600 - секунд с запуска цикла, прерываем его и выполняем дальше
        
        Send @storage
        sleep 300
        Send {Enter}
        sleep 400
        Click down, left, 336, 219
        Click up right, left, 137, 166
        sleep 50
        Send 80
        sleep 10
        Send {Enter}
        sleep 100
        MouseClick, left, 520, 418       ; Далее начинаем общий цикл снова
    }

</code></pre></div><p><span style="color: blue">Отредактировано serzh82saratov (Сегодня 20:10:58)</span><br />Исправил свои ошибки в отступах. И вам советую соблюдать <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-03-17T16:02:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70397#p70397</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Нажатие кнопок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70396#p70396" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p><a href="http://forum.script-coding.com/viewtopic.php?pid=69887#p69887">http://forum.script-coding.com/viewtopi … 887#p69887</a></p></blockquote></div><p>Как в моём случае следует начинать цикл?</p>]]></content>
			<author>
				<name><![CDATA[hifana12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29817</uri>
			</author>
			<updated>2013-03-17T15:48:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70396#p70396</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Нажатие кнопок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70395#p70395" />
			<content type="html"><![CDATA[<p><a href="http://forum.script-coding.com/viewtopic.php?pid=69887#p69887">http://forum.script-coding.com/viewtopi … 887#p69887</a></p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-03-17T15:40:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70395#p70395</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Нажатие кнопок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70394#p70394" />
			<content type="html"><![CDATA[<p>Хотя бы пример как начать.</p>]]></content>
			<author>
				<name><![CDATA[hifana12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29817</uri>
			</author>
			<updated>2013-03-17T15:21:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70394#p70394</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Нажатие кнопок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70393#p70393" />
			<content type="html"><![CDATA[<p>Наверно записать всё в цикл:<br /></p><div class="codebox"><pre><code>Loop  {  

   •••••••••

}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-03-17T14:49:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70393#p70393</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK:Нажатие кнопок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70392#p70392" />
			<content type="html"><![CDATA[<p>Сталкнулся вот с такой проблемой.</p><p>Вот сам код:</p><div class="codebox"><pre><code>F1::

SetTimer, ImageCheck, 100
return
ImageCheck:
{
PixelSearch x, y, 1508, 81, 1508, 96, 0xFF0000, 5, Fast
    if ( ErrorLevel &gt; 0 )
{
PixelSearch x, y, 3, 25, 1675, 1048, 0xFF0000, 5, Fast
    if ( ErrorLevel &gt; 0 )
        {
        ;если ErrorLevel &gt; 0
        Send, {F2}
sleep, 1000
        return
        }
Send, {F4}
sleep, 50
Click %x% %y%
sleep, 100
return
}
F3::Pause</code></pre></div><br /><p>Надо чтобы после этого скрипта через 10 мин.</p><p>Выполнялся этот:</p><br /><div class="codebox"><pre><code>Send @storage
sleep 300
Send {Enter}
sleep 400
Click down, left, 336, 219
Click up right, left, 137, 166
sleep 50
Send 80
sleep 10
Send {Enter}
sleep 100
MouseClick, left, 520, 418</code></pre></div><p>и так постоянно.</p><p>Как мне их объеденить?</p>]]></content>
			<author>
				<name><![CDATA[hifana12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29817</uri>
			</author>
			<updated>2013-03-17T14:29:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70392#p70392</id>
		</entry>
</feed>
