<?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=17380&amp;type=atom" />
	<updated>2022-09-24T11:10:05Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=17380</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сообщение с таймером]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154903#p154903" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>#SingleInstance Force
#NoEnv

Gui, Add, Pic,, c:\colombo.png
Gui, Show

loop 5
   sleep 1000

Gui, Destroy
ExitApp
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[stuermer]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42062</uri>
			</author>
			<updated>2022-09-24T11:10:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154903#p154903</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сообщение с таймером]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154899#p154899" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>loop 5
{
   tooltip % 6-A_Index
   sleep 1000
}
msgbox done</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2022-09-23T23:53:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154899#p154899</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сообщение с таймером]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154897#p154897" />
			<content type="html"><![CDATA[<p><strong>stuermer</strong></p><p>Код из одной строки:</p><p>1. Создаём отдельным файлом скрипт и внедряем в него любой код.<br />2. Создаём второй ahk скрипт и присоединяем первый через &quot;#Include&quot;. <img src="//forum.script-coding.com/img/smilies/big_smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Clannad5]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39853</uri>
			</author>
			<updated>2022-09-23T17:57:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154897#p154897</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сообщение с таймером]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154895#p154895" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>stuermer пишет:</cite><blockquote><p>Там 2 строчки должно быть, можно без обратного отсчета</p></blockquote></div><p>Как сделаете, выкладывайте.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2022-09-23T16:18:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154895#p154895</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сообщение с таймером]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154894#p154894" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong><br />Запустил, да работает, класс, но код слишком большой. Там 2 строчки должно быть, можно без обратного отсчета.</p>]]></content>
			<author>
				<name><![CDATA[stuermer]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42062</uri>
			</author>
			<updated>2022-09-23T15:20:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154894#p154894</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сообщение с таймером]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154893#p154893" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>stuermer пишет:</cite><blockquote><p>Сообщения без кнопки бывают?</p></blockquote></div><p>А вы код запускали, прежде чем писать?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2022-09-23T15:06:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154893#p154893</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сообщение с таймером]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154880#p154880" />
			<content type="html"><![CDATA[<p><strong>stuermer</strong><br />Так можно же сделать TimeOut на Msgbox, насколько я помню.<br />Так же еще можно через ToolTip выводить текст.</p>]]></content>
			<author>
				<name><![CDATA[Clannad5]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39853</uri>
			</author>
			<updated>2022-09-23T11:02:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154880#p154880</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сообщение с таймером]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154878#p154878" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Можно и с MsgBox замутить.</p></blockquote></div><p>Так на MsgBox кнопку нажимать надо, а нужно чтобы само сообщение исчезло через 5 с.<br />Сообщения без кнопки бывают?</p>]]></content>
			<author>
				<name><![CDATA[stuermer]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42062</uri>
			</author>
			<updated>2022-09-23T09:52:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154878#p154878</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сообщение с таймером]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154868#p154868" />
			<content type="html"><![CDATA[<p>Можно и с MsgBox замутить.<br />Если что поинтереснее надо, у меня в подписи ссылка на часики.<br /></p><div class="codebox"><pre><code>#SingleInstance Force
#NoEnv
 
duration := 5000
OnMessage(0x44, &quot;OnMsgBox&quot;)
MsgBox
Return

OnMsgBox() {
	Global
	OnMessage(0x44, &quot;&quot;) 
    DetectHiddenWindows, On
    Process, Exist
    If (WinExist(&quot;ahk_class #32770 ahk_pid &quot; . ErrorLevel)) {
		win := WinExist()
		StartTime := A_TickCount
		Control, Hide,, Button1 
		SetTimer, SetText, -1 
    }
}

SetText:
	last := (A_TickCount - StartTime)
	ControlSetText Static1, % (duration - last) // 1000 &quot; sec&quot;, ahk_id %win%  
	If duration - last &gt; 1000
		SetTimer, SetText, -1000
	Else 
		SetTimer, Action, % &quot;-&quot; duration - last
	Return 
	
Action:
	WinClose ahk_id %win%
	MsgBox complete
	Return </code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2022-09-22T19:25:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154868#p154868</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сообщение с таймером]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154867#p154867" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Clannad5 пишет:</cite><blockquote><p><strong>teadrinker</strong><br />Так он же хочет визуализировать, то есть нужно чтобы каждую секунд уменьшалось, я так понял его вопрос.</p></blockquote></div><p>Да. Но нужно, чтобы сообщение по истечении времени само исчезло. Можно и без обратного отсчета, просто сообщение, например &quot;Идет обработка...&quot;.</p>]]></content>
			<author>
				<name><![CDATA[stuermer]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42062</uri>
			</author>
			<updated>2022-09-22T17:21:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154867#p154867</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сообщение с таймером]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154865#p154865" />
			<content type="html"><![CDATA[<p>А зачем для этого каждый раз таймер запускать, не пойму? Одного разве не достаточно?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-09-22T14:41:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154865#p154865</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сообщение с таймером]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154864#p154864" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Так он же хочет визуализировать, то есть нужно чтобы каждую секунд уменьшалось, я так понял его вопрос.</p>]]></content>
			<author>
				<name><![CDATA[Clannad5]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39853</uri>
			</author>
			<updated>2022-09-22T14:36:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154864#p154864</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сообщение с таймером]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154863#p154863" />
			<content type="html"><![CDATA[<p>А зачем каждую секунду?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-09-22T14:27:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154863#p154863</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сообщение с таймером]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154861#p154861" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />А, такого даже не подозревал.<br />Тогда да, SetTimer будет лучше, однако запускать SetTimer каждую секунду - это не извращение?Не лучше ли тогда на второй поток вывести?</p>]]></content>
			<author>
				<name><![CDATA[Clannad5]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39853</uri>
			</author>
			<updated>2022-09-22T13:43:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154861#p154861</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сообщение с таймером]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154860#p154860" />
			<content type="html"><![CDATA[<p>Конечно. Наверно же предполагалось, что скрипт должен иметь возможность делать что-то ещё во время отсчёта.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-09-22T13:05:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154860#p154860</id>
		</entry>
</feed>
