<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Не останавливается кликер через определенное количество времени]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=17899</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=17899&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Не останавливается кликер через определенное количество времени».]]></description>
		<lastBuildDate>Sun, 13 Aug 2023 21:15:55 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Не останавливается кликер через определенное количество времени]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=159023#p159023</link>
			<description><![CDATA[<p>Наверняка этот код можно улучшить (и вряд ли автор сюда уже заглянет), тем не менее:</p><div class="codebox"><pre><code>;постановка цикла на паузу с сохранением оставшегося времени

1::

total_time := 10000	;максимальное время выполнения цикла
start_time := A_TickCount	;время начала выполнения цикла
time_left := total_time - (A_TickCount - start_time)	;оставшееся время выполнения цикла

;снятие с паузы:
9::
start_time := A_TickCount	;сдвигаем (обновляем) стартовую точку
total_time := time_left	;обновляем время выполнения цикла
Pause, off

while (time_left &gt; 0)
{
	ToolTip, %A_Index%	;демонстрация работы цикла
	Sleep, 1000
	time_left := total_time - (A_TickCount - start_time)
}

;постановка на паузу:
0::
time_left := total_time - (A_TickCount - start_time)	;сохраняем оставшееся время
Pause, on


2::Reload

</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Qp)]]></author>
			<pubDate>Sun, 13 Aug 2023 21:15:55 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=159023#p159023</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Не останавливается кликер через определенное количество времени]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158943#p158943</link>
			<description><![CDATA[<p>Как условно сделать так, чтобы когда я ставил на паузу скрипт, время прописанное 60 сек, не шло в учет паузы? Чтобы допустим я поставил паузу на 10 секундах, а после запуская, он проработал еще 50 секунд.</p><p>Pause on</p><p>time_to_run = 60000 ; <br />start_time := A_TickCount<br />while (A_TickCount - start_time) &lt; time_to_run </p><br /><p>{<br />Click<br />sleep 15<br />}</p><p>msgbox,</p><br /><p>Numpad0::Pause</p>]]></description>
			<author><![CDATA[null@example.com (Farezzo)]]></author>
			<pubDate>Sat, 05 Aug 2023 21:24:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158943#p158943</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Не останавливается кликер через определенное количество времени]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158942#p158942</link>
			<description><![CDATA[<p>Нашел проблему) Закрыть, удалить можно.</p>]]></description>
			<author><![CDATA[null@example.com (Farezzo)]]></author>
			<pubDate>Sat, 05 Aug 2023 21:14:12 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158942#p158942</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Не останавливается кликер через определенное количество времени]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158941#p158941</link>
			<description><![CDATA[<p>Я чайник, чайником...<br />Решил обратиться за помощью, почему через определенное количество времени скрипт не останавливается, а фигачит навечно...</p><p>Numpad0::</p><p>time_to_run = 10000 ; <br />start_time := A_TickCount<br />while (A_TickCount - start_time) &lt; time_to_run </p><br /><p>{<br />Click<br />sleep 15<br />}</p><p>msgbox,<br />ExitApp</p>]]></description>
			<author><![CDATA[null@example.com (Farezzo)]]></author>
			<pubDate>Sat, 05 Aug 2023 21:11:50 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158941#p158941</guid>
		</item>
	</channel>
</rss>
