<?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=7031&amp;type=atom" />
	<updated>2012-04-05T16:19:30Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=7031</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Воспроизведение макроса многократно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58878#p58878" />
			<content type="html"><![CDATA[<p>Огромное Спасибо=)</p>]]></content>
			<author>
				<name><![CDATA[Gabe_#33]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27760</uri>
			</author>
			<updated>2012-04-05T16:19:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58878#p58878</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Воспроизведение макроса многократно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58849#p58849" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>SetScrollLockState , AlwaysOff
SetNumLockState , AlwaysOn
#SingleInstance force
#Persistent
#NoEnv

SetTimer, KeepRunning ; 250 мс подразумевается
SetTimer, Start, -1   ; однократно и «прямо сейчас»
return                ; вот здесь то и конец единственной и неповторимой «секции автовыполнения»

KeepRunning:
    WinGet, szProcessName, ProcessName, A
    if szProcessName = blabla.exe
        Suspend, off
    else
        Suspend, on
    return

Start:
    Loop
    {
        Sleep 30
        ADRESTEXNIKI()
        If adr_TEX = 0x0
            Continue
        ADRESCAMERI()
        IF adr_CAM = 0x1
        {
            Send {F9 down}
            Sleep,30
            Send {F9 up}
        }
    }
    return

$Numpad4::
    SetKeyDelay,15,30,Play
    SendPlay %clipboard%
    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-04-05T08:33:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58849#p58849</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Воспроизведение макроса многократно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58845#p58845" />
			<content type="html"><![CDATA[<p>Тело скипта - две секции &quot;авто-выполнения-(АВ)&quot; и далее по нажатию какой либо клавиши.<br />Почему первая секция (АВ) выпоняется нормально а вторая не работает?</p><div class="codebox"><pre><code>SetScrollLockState , AlwaysOff 
SetNumLockState , AlwaysOn
#SingleInstance force
#Persistent
#NoEnv

SetTimer, KeepRunning 
Return

KeepRunning:
 
WinGet, szProcessName, ProcessName, A 
if szProcessName = blabla.exe 
{ 
Suspend, off 
} 
else 
{ 
Suspend, on 
} 
Return

Start:
Loop
{
    ADRESTEXNIKI()
    If adr_TEX = 0x0
    {
        Goto Start
    }
    ADRESCAMERI()
    IF adr_CAM = 0x1
    {
        Send {F9 down}
        Sleep,30
        Send {F9 up}
    }
    Sleep 20
}
Return



$Numpad4::
SetKeyDelay,15,30,Play
SendPlay %clipboard%
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Gabe_#33]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27760</uri>
			</author>
			<updated>2012-04-05T01:39:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58845#p58845</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Воспроизведение макроса многократно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58844#p58844" />
			<content type="html"><![CDATA[<p>Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[Gabe_#33]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27760</uri>
			</author>
			<updated>2012-04-04T22:43:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58844#p58844</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Воспроизведение макроса многократно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58842#p58842" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Loop
{
    ADRESTEXNIKI()
    If adr_TEX = 0x0
        break
    ADRESCAMERI()
    IF adr_CAM = 0x1
    {
        Send {F9 down}
        Sleep,30
        Send {F9 up}
    }
    Sleep 20
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-04-04T20:47:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58842#p58842</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Воспроизведение макроса многократно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58841#p58841" />
			<content type="html"><![CDATA[<p>Будте любезны,помогите сделать чтобы сей скрипт &quot;авто-выполнялся&quot;,без участия какой либо клавиши.</p><div class="codebox"><pre><code>~*$W::
Loop
    {
GetKeyState, WState, W, P 
if WState = U 
break
ADRESTEXNIKI()
If adr_TEX := 0x0
break
ADRESCAMERI()
IF adr_CAM = 0x1
{
Send {F9 down}
Sleep,30
Send {F9 up}
}
    }</code></pre></div><p>Тобишь с момента его включения,он начал без прерывно проверять переменную - &quot;adr_TEX&quot;.И если она ровна нулю,начать заново, если&nbsp; не ровна нулю,то продолжить далее...</p>]]></content>
			<author>
				<name><![CDATA[Gabe_#33]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27760</uri>
			</author>
			<updated>2012-04-04T20:14:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58841#p58841</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Воспроизведение макроса многократно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58703#p58703" />
			<content type="html"><![CDATA[<p>спасибо большое <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Алексей Марч.]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27798</uri>
			</author>
			<updated>2012-04-01T15:16:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58703#p58703</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Воспроизведение макроса многократно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58695#p58695" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Алексей Марч. пишет:</cite><blockquote><p>и есть ли програмы такае же как AHK токо многопоточные?</p></blockquote></div><p>есть, например запусти три таймера и вычисляй что то.<br />Вот пример - <a href="https://dl-web.dropbox.com/get/Public/AHK/GamePad.ahk?w=1cae3ad4">GamePad.ahk</a> правда она не доделана ещё до конца.</p>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2012-04-01T13:40:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58695#p58695</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Воспроизведение макроса многократно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58689#p58689" />
			<content type="html"><![CDATA[<p>Понятно, спасибо.</p>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2012-04-01T11:48:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58689#p58689</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Воспроизведение макроса многократно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58685#p58685" />
			<content type="html"><![CDATA[<p>Нет, это сокращение от Physical.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2012-04-01T11:17:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58685#p58685</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Воспроизведение макроса многократно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58681#p58681" />
			<content type="html"><![CDATA[<p>В данном коде использовал <a href="http://www.autohotkey.com/docs/Functions.htm#BuiltIn">встроенную функцию</a> GetKeyState, есть и <a href="http://www.script-coding.com/AutoHotkey/GetKeyState.html">одноимённая комманда</a>. &quot;P&quot; параметр (сокращение от pressed, &quot;T&quot; - toggle (IMHO)).</p>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2012-04-01T10:14:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58681#p58681</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Воспроизведение макроса многократно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58679#p58679" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Grey пишет:</cite><blockquote><p>Sleep, !GetKeyState(&quot;NumpadIns&quot;, &quot;P&quot;) ? -1:425</p></blockquote></div><p>скажи пожалуйста, что в коде значит&nbsp; &quot;P&quot;) ?&nbsp; <br />есть ли програмы такае же как AHK только многопоточные?</p>]]></content>
			<author>
				<name><![CDATA[Алексей Марч.]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27798</uri>
			</author>
			<updated>2012-04-01T09:30:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58679#p58679</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Воспроизведение макроса многократно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58674#p58674" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Алексей Марч. пишет:</cite><blockquote><p>...мгновенно...</p></blockquote></div><p>Это однопоточная программа, по этому всё зависит на каком этапе выполнения в цикле происходит отжим клавиши:</p><div class="codebox"><pre><code>#NoEnv
SendMode, Input

NumpadIns::
   While, GetKeyState(&quot;NumpadIns&quot;, &quot;P&quot;)
   {
      Send, {NumpadEnd Down}
      Sleep, !GetKeyState(&quot;NumpadIns&quot;, &quot;P&quot;) ? -1:425
      Send, {NumpadEnd Up}
      Sleep, !GetKeyState(&quot;NumpadIns&quot;, &quot;P&quot;) ? -1:15
   }
   Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2012-04-01T06:05:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58674#p58674</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Воспроизведение макроса многократно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58669#p58669" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>;код проверки и если нужно выполнить - ExitApp</p></blockquote></div><p>незнаю как это написать ,<br />если можеш покажи пример пожалуйста<br />(типа когда кнопку отпустил, как вписать)</p>]]></content>
			<author>
				<name><![CDATA[Алексей Марч.]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27798</uri>
			</author>
			<updated>2012-03-31T22:30:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58669#p58669</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Воспроизведение макроса многократно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=58663#p58663" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Алексей Марч. пишет:</cite><blockquote><p>как сделать чтоб при нажатии клавиши макрос воспроизводился многократно,</p></blockquote></div><p>использовать <a href="http://www.autohotkey.com/docs/commands/While.htm">While-loop</a><br /></p><div class="codebox"><pre><code>While [условие выполнения цикла]
 {
;Ваш скрипт
}
return</code></pre></div><p>Для прерывания в любой точке запустите таймер <a href="http://www.autohotkey.com/docs/commands/SetTimer.htm">SetTimer</a> и используйте <a href="http://www.autohotkey.com/docs/commands/ExitApp.htm">ExitApp</a><br /></p><div class="codebox"><pre><code>SetTimer, myLabel, 10
return
myLabel:
;код проверки и если нужно выполнить - ExitApp
return</code></pre></div><p>Думаю всё верно, если я правильно понял вопрос. Просто прервать цикл в любой точке проблематично, хотя можно, но с извращениями... на мой взгляд.</p><p>P.S. И обязательно поправьте пост, т.е. то о чем сказал <strong>creature.ws</strong></p>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2012-03-31T15:07:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=58663#p58663</id>
		</entry>
</feed>
