<?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=13907&amp;type=atom" />
	<updated>2018-07-07T12:56:39Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13907</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вызов функции через время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126782#p126782" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>#Persistent
timer := ObjBindMethod(test, &quot;funcion&quot;, &quot;Привет!&quot;)
SetTimer, % timer, -1000

class test
{
   funcion(txt)
   {
      msgbox, % txt
      ExitApp
   }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-07-07T12:56:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126782#p126782</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вызов функции через время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126780#p126780" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
SetTimer, % ObjBindMethod(test, &quot;function&quot;), 1000
</code></pre></div><p>UPD. Хммм, такое не работает. Думаю, это из-за того, что ObjBindMethod возвращает объект, а не функцию.<br />Если только костылем.<br /></p><div class="codebox"><pre><code>
#Persistent
SetTimer, function, 2000
return

function() {
	;fn:=ObjBindMethod(say, &quot;my_name&quot;)
	;%fn%(&quot;John&quot;)
	say.my_name(&quot;John&quot;)
}

class say {
	my_name(name) {
		msgbox % &quot;Hello, &quot; name &quot;!&quot;
	}
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[MandarinKa02]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34409</uri>
			</author>
			<updated>2018-07-07T12:00:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126780#p126780</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вызов функции через время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126763#p126763" />
			<content type="html"><![CDATA[<p>А если допустим функция класса?<br /></p><div class="codebox"><pre><code>SetTimer, test.function, -1000

class test
{
	funcion()
	{
		msgbox, % &quot;Тест&quot;
	}
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Phoenixxx_Czar]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34426</uri>
			</author>
			<updated>2018-07-07T00:10:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126763#p126763</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вызов функции через время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126719#p126719" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Phoenixxx_Czar пишет:</cite><blockquote><p>меня интересует вызов функции через определенное время. Что-то по типу SetTimer, <strong>только с вызовом функции, а не метки.</strong></p></blockquote></div><div class="quotebox"><cite>qqlexa пишет:</cite><blockquote><p><strong>SetTimer, Go</strong>, 5000 return F2:: <strong>Go</strong>: q()</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-07-06T08:00:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126719#p126719</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вызов функции через время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126714#p126714" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, А что не работает то?<br />Это не полный скрипт, а фрагмент кода который нужно использовать для вызова функции. Добавил включение этой метки так же на F2 чтобы скрипт продолжал работу, всё работает.</p>]]></content>
			<author>
				<name><![CDATA[qqlexa]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39096</uri>
			</author>
			<updated>2018-07-06T00:10:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126714#p126714</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вызов функции через время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126643#p126643" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, я пробовал искать, но как видно - плохо получилось.<br />Очень благодарен!</p>]]></content>
			<author>
				<name><![CDATA[Phoenixxx_Czar]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34426</uri>
			</author>
			<updated>2018-07-02T23:34:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126643#p126643</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вызов функции через время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126642#p126642" />
			<content type="html"><![CDATA[<p>В общем да, сначала следовало бы хелп почитать. На случай, если не разберётесь:<br /></p><div class="codebox"><pre><code>#Persistent
; если без параметров
SetTimer, Func1, -1000

; если с параметрами
funcObj := Func(&quot;Func2&quot;).Bind(&quot;Заголовок&quot;, &quot;A_ThisFunc&quot;, 1)
SetTimer, % funcObj, -3000
Return

Func1()  {
   MsgBox,, % &quot; &quot;, % A_ThisFunc, 1
}

Func2(title, text, timeout)  {
   MsgBox,, % title, % %text%, % timeout
   ExitApp
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-07-02T22:32:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126642#p126642</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вызов функции через время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126639#p126639" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, я не хочу делать метку под функцию, может есть вариант лучше? Тот же DllCall (если с помощью его можно)?</p>]]></content>
			<author>
				<name><![CDATA[Phoenixxx_Czar]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34426</uri>
			</author>
			<updated>2018-07-02T22:15:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126639#p126639</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вызов функции через время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126638#p126638" />
			<content type="html"><![CDATA[<p><strong>qqlexa</strong>, сами-то запускали свой код?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-07-02T20:29:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126638#p126638</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вызов функции через время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126636#p126636" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>SetTimer, Go, 5000
return
F2::
Go:
q()
return
q()
{
msgbox, Привет
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[qqlexa]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39096</uri>
			</author>
			<updated>2018-07-02T20:25:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126636#p126636</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вызов функции через время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126630#p126630" />
			<content type="html"><![CDATA[<p>SetTimer и используйте.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-07-02T19:40:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126630#p126630</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Вызов функции через время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126627#p126627" />
			<content type="html"><![CDATA[<p>Доброго времени суток, меня интересует вызов функции через определенное время. Что-то по типу SetTimer, только с вызовом функции, а не метки.</p>]]></content>
			<author>
				<name><![CDATA[Phoenixxx_Czar]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34426</uri>
			</author>
			<updated>2018-07-02T19:04:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126627#p126627</id>
		</entry>
</feed>
