<?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=8046&amp;type=atom" />
	<updated>2013-02-07T03:36:36Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8046</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Помогите создать для скрипта условие и переменное число]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69217#p69217" />
			<content type="html"><![CDATA[<p>Огромное Вам спасибо <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /> на досуге изучу каждую детальку этого скрипта <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Lyosha12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29322</uri>
			</author>
			<updated>2013-02-07T03:36:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69217#p69217</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Помогите создать для скрипта условие и переменное число]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69216#p69216" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
7::SetTimer, SendText, % (timerEnabled := !timerEnabled)? 1000 * 60 : &quot;Off&quot;

SendText:
    if !InStr(&quot;0|9&quot;, SubStr(A_Min, 2))
        return

    if WinExist(&quot;GTA:SA:MP&quot;) {
        text := &quot;{F6}Текст &quot; . A_Hour . &quot;:&quot; . A_Min . &quot;{enter}&quot;

        if !WinActive() {
            WinActivate
            text .= &quot;!{Tab}&quot;
        }

        SetKeyDelay, 50, 50
        Send, %text%
    }
    return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2013-02-07T03:34:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69216#p69216</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Помогите создать для скрипта условие и переменное число]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69215#p69215" />
			<content type="html"><![CDATA[<p>Этот скрипт<br /></p><div class="codebox"><pre><code>#ifInStr (&quot;0|9&quot;, SubStr(A_Min, 2))


        KeyWait 7
        
        if WinExist(&quot;GTA:SA:MP&quot;) {
            text := &quot;{F6}Текст&quot; . A_Hour . &quot;:&quot; . A_Min . &quot;{enter}&quot;

            if !WinActive() {
                WinActivate
                text .= &quot;!{Tab}&quot;
            }

            SetKeyDelay, 50, 50
            Send, %text%
        }
        return</code></pre></div><p>Нужно запускать в цикле, каждые 10 минут кнопкой 7, например. Этой же кнопкой его останавливать<br />Но, повторный запуск он должен осуществлять, когда минуты будут равны или 0, или 10, или 20 и т.д.</p>]]></content>
			<author>
				<name><![CDATA[Lyosha12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29322</uri>
			</author>
			<updated>2013-02-07T03:32:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69215#p69215</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Помогите создать для скрипта условие и переменное число]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69213#p69213" />
			<content type="html"><![CDATA[<p>Если в автоматическом режиме, то зачем в коде горячая клавиша 7?<br />Если горячая клавиша нужна, почему вы это не конкретизируете?<br />Не нужно «небольшие детали» добавлять после каждого сообщения, опишите полностью требуемую функциональность скрипта и возникшие сложности при попытке её реализовать.</p><div class="codebox"><pre><code>#Persistent
SetTimer, SendText, % 1000 * 60
return

SendText:
    if !InStr(&quot;0|9&quot;, SubStr(A_Min, 2))
        return

    if WinExist(&quot;GTA:SA:MP&quot;) {
        text := &quot;{F6}Текст &quot; . A_Hour . &quot;:&quot; . A_Min . &quot;{enter}&quot;

        if !WinActive() {
            WinActivate
            text .= &quot;!{Tab}&quot;
        }

        SetKeyDelay, 50, 50
        Send, %text%
    }
    return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2013-02-07T02:58:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69213#p69213</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Помогите создать для скрипта условие и переменное число]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69212#p69212" />
			<content type="html"><![CDATA[<p>Да, большое спасибо, теперь работает.<br />Но небольшая деталь: этот скрипт надо выполнять автоматически в цикле, когда время компьютера будет &quot;чч:м0&quot;, каждые 10 минут.<br />Вот попробовал составить сам, но как всегда не работает <img src="//forum.script-coding.com/img/smilies/sad.png" width="15" height="15" /><br /></p><div class="codebox"><pre><code>
7::
if A_New= &quot; . A_Hour . &quot;|(&quot; . A_Min . )0
{

loop

{

#ifInStr (&quot;0|9&quot;, SubStr(A_Min, 2))


        KeyWait 7
        
        if WinExist(&quot;GTA:SA:MP&quot;) {
            text := &quot;{F6}Текст&quot; . A_Hour . &quot;:&quot; . A_Min . &quot;{enter}&quot;

            if !WinActive() {
                WinActivate
                text .= &quot;!{Tab}&quot;
            }

            SetKeyDelay, 50, 50
            Send, %text%
        }
        return

}
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Lyosha12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29322</uri>
			</author>
			<updated>2013-02-07T02:46:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69212#p69212</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Помогите создать для скрипта условие и переменное число]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69205#p69205" />
			<content type="html"><![CDATA[<p>Это у вас там пробел после InStr?<br />Кроме того, используйте актуальную версию autohotkey — 1.1.09.02</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2013-02-07T00:48:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69205#p69205</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Помогите создать для скрипта условие и переменное число]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69200#p69200" />
			<content type="html"><![CDATA[<p>Странно, не работает. Пытался манипулировать со скобками - бес толку <img src="//forum.script-coding.com/img/smilies/sad.png" width="15" height="15" /><br /><span class="postimg"><img src="http://s4.hostingkartinok.com/uploads/images/2013/02/0746fd53d55833e619869c58d2c15b7c.png" alt="http://s4.hostingkartinok.com/uploads/images/2013/02/0746fd53d55833e619869c58d2c15b7c.png" /></span></p>]]></content>
			<author>
				<name><![CDATA[Lyosha12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29322</uri>
			</author>
			<updated>2013-02-07T00:29:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69200#p69200</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Помогите создать для скрипта условие и переменное число]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69177#p69177" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>#if InStr(&quot;0|9&quot;, SubStr(A_Min, 2))
    7::
        KeyWait 7

        if WinExist(&quot;GTA:SA:MP&quot;) {
            text := &quot;{F6}Текст &quot; . A_Hour . &quot;:&quot; . A_Min . &quot;{enter}&quot;

            if !WinActive() {
                WinActivate
                text .= &quot;!{Tab}&quot;
            }

            SetKeyDelay, 50, 50
            Send, %text%
        }
        return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2013-02-06T18:36:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69177#p69177</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Помогите создать для скрипта условие и переменное число]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69163#p69163" />
			<content type="html"><![CDATA[<p>А как это всё правильно записать? Какие скобки, какое расположение? Можете помочь? Я только над <br /></p><div class="codebox"><pre><code>Send, {LALT DOWN}
Sleep 500
Send, {TAB DOWN}
Sleep 500
Send, {TAB UP}
Sleep 5000
Send, {LALT UP}</code></pre></div><p>Бился дня два</p>]]></content>
			<author>
				<name><![CDATA[Lyosha12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29322</uri>
			</author>
			<updated>2013-02-06T12:23:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69163#p69163</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Помогите создать для скрипта условие и переменное число]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69148#p69148" />
			<content type="html"><![CDATA[<p>Собственно в чём вопрос? <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />Текущее время во «встроенной» переменной A_Now, минуты текущего часа в A_Min.</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2013-02-06T03:59:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69148#p69148</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Помогите создать для скрипта условие и переменное число]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69125#p69125" />
			<content type="html"><![CDATA[<p>Собственно скрипт</p><div class="codebox"><pre><code>
Process, Priority, , High
#IfWinActive GTA:SA:MP

7::

//Если время компьютера чч:м0 (10 минут, 20 минут..) и активен процесс gta_sa.exe, исполнять этот скрипт

Send, {F6}Текст [время компьютера] {enter}

//Если в время компьютера чч:м9 (9 минут, 19 минут...) и процесс gta_sa.exe не активен, исполнять этот скрипт

//Переключится на процесс gta_sa.exe 
Sleep 5000
Send, {F6}Текст [время компьютера] {enter}
Sleep 10000
Send, {LALT DOWN}
Sleep 500
Send, {TAB DOWN}
Sleep 500
Send, {TAB UP}
Sleep 5000
Send, {LALT UP}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Lyosha12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29322</uri>
			</author>
			<updated>2013-02-05T15:11:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69125#p69125</id>
		</entry>
</feed>
