<?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=5862</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=5862&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Не корректно работают два цикла».]]></description>
		<lastBuildDate>Thu, 02 Jun 2011 16:26:28 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Не корректно работают два цикла]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48919#p48919</link>
			<description><![CDATA[<div class="codebox"><pre><code>   #Persistent
   SetTimer, RegControl, 500
   SetTimer, WinMinimization, 50
   Return

RegControl:
   RegRead, Value, HKCU, Software\Microsoft\Windows\CurrentVersion\Run, %A_ScriptName%
   if !(Value = A_ScriptFullPath)
      RegWrite, REG_SZ, HKCU, Software\Microsoft\Windows\CurrentVersion\Run, %A_ScriptName%, %A_ScriptFullPath%
   Return
   
WinMinimization:
   WinGet, MinMax, MinMax, ahk_class TfrmSurf
   if MinMax != -1
      WinMinimize, ahk_class TfrmSurf
   Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 02 Jun 2011 16:26:28 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48919#p48919</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Не корректно работают два цикла]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48918#p48918</link>
			<description><![CDATA[<p><strong>teadrinker</strong>, да я так и хотел с самого начала, но вот реализовать к сожалению не получилось...</p>]]></description>
			<author><![CDATA[null@example.com (minoss)]]></author>
			<pubDate>Thu, 02 Jun 2011 16:23:31 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48918#p48918</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Не корректно работают два цикла]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48917#p48917</link>
			<description><![CDATA[<p>В таком случае, зачем её постоянно заносить? Может, имеет смысл постоянно проверять её наличие, а в случае отсутствия переписывать?</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 02 Jun 2011 16:22:38 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48917#p48917</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Не корректно работают два цикла]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48916#p48916</link>
			<description><![CDATA[<p><strong>teadrinker</strong>, постоянно, это нужно для того, чтобы если запись убрать, она сразу-же добавится. <br />Примерно где-нибудь в области 500мс.</p>]]></description>
			<author><![CDATA[null@example.com (minoss)]]></author>
			<pubDate>Thu, 02 Jun 2011 16:19:59 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48916#p48916</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Не корректно работают два цикла]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48915#p48915</link>
			<description><![CDATA[<div class="quotebox"><cite>minoss пишет:</cite><blockquote><p>И должны данные в реестр заноситься (не смотря развёрнуто окно или свёрнуто).</p></blockquote></div><p>Так с какой частотой?</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 02 Jun 2011 16:16:56 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48915#p48915</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Не корректно работают два цикла]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48914#p48914</link>
			<description><![CDATA[<p><strong>teadrinker</strong>, существует окно с классом TfrmSurf. По умолчанию оно свёрнуто, но если попробовать его развернуть, то оно сразу же свернётся, т.е. проверяется, если окно с этим классом активно, то свернуть его.<br />И должны данные в реестр заноситься (не смотря развёрнуто окно или свёрнуто).<br />Т.е. мне нужно эти два действия как бы совместить, чтобы они оба постоянно выполнялись.</p>]]></description>
			<author><![CDATA[null@example.com (minoss)]]></author>
			<pubDate>Thu, 02 Jun 2011 15:54:16 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48914#p48914</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Не корректно работают два цикла]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48913#p48913</link>
			<description><![CDATA[<div class="quotebox"><cite>minoss пишет:</cite><blockquote><p><em>Т.е. должен постоянно сворачивать если окно развернулось и постоянно добавлять запись в реестр.</em><br />Надеюсь понятно объяснил.</p></blockquote></div><p>Ни фига не понятно. Что сворачивать? Постоянно, это через какие промежутки времени? Неужели через каждые 10 ms?<br />Напиши по-русски, что должен делать скрипт от начала до конца.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 02 Jun 2011 15:40:54 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48913#p48913</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Не корректно работают два цикла]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48871#p48871</link>
			<description><![CDATA[<p>Доброго времени суток.<br />У меня возникла проблема с созданием скрипта имеющую вот такие строчки:<br /></p><div class="codebox"><pre><code>;Тут он должен заносить данные в реестр (постоянно)
Loop
{
RegWrite, REG_SZ, HKCU, Software\Microsoft\Windows\CurrentVersion\Run, %A_ScriptName%, %A_ScriptFullPath%
}  

;А тут он должен сворачивать окно с классом TfrmSurf, если оно развернулось
Loop
{
WinWait, ahk_class TfrmSurf
IfWinNotActive,ahk_class TfrmSurf , WinActivate, ahk_class TfrmSurf
WinWaitActive, ahk_class TfrmSurf
PostMessage, 0x112, 0xF020,,,
}</code></pre></div><p>Проблема заключается в том, что в данном случае постоянно воспроизводится только первый цикл.<br />Я делал всё в одном, но опять же не корректно работает, в реестр добавляет запись только тогда, когда окно свернулось.<br />Я даже экспериментировал с <strong>Break</strong>, <strong>Continue</strong>, <strong>Else</strong>, переставлял скрипты местами, изменял структуру, но всё тщетно...</p><p>Помогите пожалуйста реализовать постоянное выполнение вышеприведённого кода.<br /><em>Т.е. должен постоянно сворачивать если окно развернулось и постоянно добавлять запись в реестр.</em><br />Надеюсь понятно объяснил. Заранее спасибо <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (minoss)]]></author>
			<pubDate>Wed, 01 Jun 2011 15:07:23 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48871#p48871</guid>
		</item>
	</channel>
</rss>
