<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: SkriptKiller]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=17573&amp;type=atom" />
	<updated>2023-02-01T09:10:46Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=17573</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SkriptKiller]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156586#p156586" />
			<content type="html"><![CDATA[<p>В этом месте кода проблем не должно быть.<br />Тестируйте горячие клавиши по одной в новом файле. Пробуйте многократно активировать, а также удерживать горячую клавишу.</p>]]></content>
			<author>
				<name><![CDATA[Taveron]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41949</uri>
			</author>
			<updated>2023-02-01T09:10:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156586#p156586</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SkriptKiller]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156585#p156585" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>__Михаил__ пишет:</cite><blockquote><p>В теле скрипта обязательно задержку использовать после шапки автозапуска</p></blockquote></div><p>В каком именно месте? Что такое шапка <strong>автозапуска</strong>?</p><div class="quotebox"><cite>Taveron пишет:</cite><blockquote><p>~CapsLock up::Reload</p></blockquote></div><p>Не особо помогает. Всё также может открыть ни с того не с сего 50 копий. <br />Может задержку добавить? пару мс...<br /></p><div class="codebox"><pre><code>~Capslock up::
	Sleep 1
 	Reload
*End::
 	ExitApp
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[yellow]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41963</uri>
			</author>
			<updated>2023-02-01T07:38:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156585#p156585</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SkriptKiller]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156543#p156543" />
			<content type="html"><![CDATA[<p>Попробуйте сделать так:<br /></p><div class="codebox"><pre><code>
~CapsLock up::Reload
</code></pre></div><p>Здесь Reload будет срабатывать при отпускании CapsLock.<br />В вашем же варианте, Reload срабатывает постоянно с маленькой задержкой, когда удерживается CapsLock, и директива не успевает срабатывать.</p>]]></content>
			<author>
				<name><![CDATA[Taveron]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41949</uri>
			</author>
			<updated>2023-01-28T20:35:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156543#p156543</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SkriptKiller]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156542#p156542" />
			<content type="html"><![CDATA[<p>Если выполнять &#039;Reload&#039; неправильно, то будет запуск несколько копий. Как минимум ожидание отпуска клавиши добавить нужно. Это самое простое что придёт в голову любому при подобной проблеме. В теле скрипта обязательно задержку использовать после шапки автозапуска. Так может помочь при резком запуске скрипта от повторов.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2023-01-28T20:33:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156542#p156542</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SkriptKiller]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156541#p156541" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Taveron пишет:</cite><blockquote><p>Вот пример неправильного кода:<br /></p><div class="codebox"><pre><code>
#SingleInstance, Force

F1::
loop 10
	Reload
return
</code></pre></div><p>Скрипт начинает дублировать себя, даже при наличии директивы <em>#SingleInstance, Force</em>.</p></blockquote></div><p>Да, там есть релоад. А что он как ведёт себя? Что нужно добавиь к релоад чтобы учитывало эту директиву? Вроде бы просто должен перезагружаться и всё. Но при &quot;некоторых обстоятельствах&quot; открывается несколько копий.</p><p>Там стоит ~Capslock::Reload и всё, он уже больше ничем не закрывается.</p>]]></content>
			<author>
				<name><![CDATA[yellow]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41963</uri>
			</author>
			<updated>2023-01-28T20:24:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156541#p156541</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SkriptKiller]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156540#p156540" />
			<content type="html"><![CDATA[<p>Я по привычке в чате где большой поток сообщений не успеваешь написать сразу после нужного поста и выходит несуразица.<br />Вот видите что получилось - пока писал - между моим постом кто-то оставил ответ, и текст получился глупым.</p>]]></content>
			<author>
				<name><![CDATA[yellow]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41963</uri>
			</author>
			<updated>2023-01-28T20:22:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156540#p156540</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SkriptKiller]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156539#p156539" />
			<content type="html"><![CDATA[<p>Вот пример неправильного кода:<br /></p><div class="codebox"><pre><code>
#SingleInstance, Force

F1::
loop 10
	Reload
return
</code></pre></div><p>Скрипт начинает дублировать себя, даже при наличии директивы <em>#SingleInstance, Force</em>.</p>]]></content>
			<author>
				<name><![CDATA[Taveron]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41949</uri>
			</author>
			<updated>2023-01-28T20:21:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156539#p156539</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SkriptKiller]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156538#p156538" />
			<content type="html"><![CDATA[<p><strong>yellow</strong>, не нужно цитировать предыдущий пост.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2023-01-28T20:15:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156538#p156538</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SkriptKiller]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156537#p156537" />
			<content type="html"><![CDATA[<p><strong>yellow</strong>, если скрипт дублирует сам себя, то это не баги AHK, а ошибка в коде этого скрипта. Тестируйте код кусками в чистом файле ahk.</p>]]></content>
			<author>
				<name><![CDATA[Taveron]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41949</uri>
			</author>
			<updated>2023-01-28T20:08:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156537#p156537</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SkriptKiller]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156536#p156536" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Taveron пишет:</cite><blockquote><p><strong>yellow</strong>, вы лучше бы лечили причину недуга, а не симптомы. А причина у вас скорее всего в скрипте.</p></blockquote></div><p>Ясен пень, но уже слишком много написано чтобы что-то менять всё равно баги так или иначе и в самом ахк есть даже если они на первый взгляд не видны.</p>]]></content>
			<author>
				<name><![CDATA[yellow]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41963</uri>
			</author>
			<updated>2023-01-28T19:47:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156536#p156536</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SkriptKiller]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156535#p156535" />
			<content type="html"><![CDATA[<p><strong>yellow</strong>, вы лучше бы лечили причину недуга, а не симптомы. А причина у вас скорее всего в скрипте.</p>]]></content>
			<author>
				<name><![CDATA[Taveron]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41949</uri>
			</author>
			<updated>2023-01-28T19:45:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156535#p156535</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SkriptKiller]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156534#p156534" />
			<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>2023-01-28T19:40:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156534#p156534</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SkriptKiller]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156533#p156533" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Но если вы перечислите все AHK окна</p></blockquote></div><p>По какому параметру перечислять и ahk и exe?</p><div class="codebox"><pre><code>

DetectHiddenWindows, On
WinGet, id, list,,, Program Manager
Loop, %id%
{
    this_id := id%A_Index%
    WinActivate, ahk_id %this_id%
    WinGetClass, this_class, ahk_id %this_id%
    WinGetTitle, this_title, ahk_id %this_id%
    MsgBox, 4, 
    , Обход всех окон`n`n%a_index% из %id%`nahk_id %this_id%`nahk_class %this_class%`n%this_title%`n`nПродолжить?
    IfMsgBox, NO, break
WinClose, %WinGetClass%
}

</code></pre></div>]]></content>
			<author>
				<name><![CDATA[yellow]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41963</uri>
			</author>
			<updated>2023-01-28T19:38:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156533#p156533</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SkriptKiller]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156532#p156532" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>yellow пишет:</cite><blockquote><p>Где там слово WMI?</p></blockquote></div><p>А зачем вам это слово?<br /></p><div class="quotebox"><cite>yellow пишет:</cite><blockquote><p>Разве не перебор всех открытых процессов?</p></blockquote></div><p>Нет, это список окон. Окно и процесс — разные вещи. Но если вы перечислите все AHK окна, вы сможете узнать и ID их процессов.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2023-01-28T19:36:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156532#p156532</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: SkriptKiller]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156531#p156531" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Я же вроде сказал, какой алгоритм</p></blockquote></div><p>Я ничего не понял из сказанного. Где там слово WMI?</p><p>И вот это<br /></p><div class="codebox"><pre><code>WinGet, IDList ,List, ahk_class AutoHotkey
Loop %IDList%</code></pre></div><p>Разве не перебор всех открытых процессов?</p><p>Окей:<br />-Перечисляем окна<br />-Узнаём их процесс<br />-Закрываем их</p>]]></content>
			<author>
				<name><![CDATA[yellow]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41963</uri>
			</author>
			<updated>2023-01-28T19:33:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156531#p156531</id>
		</entry>
</feed>
