<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Отключение при отжатии модификаторов shift, alt, ctrl в скрипте]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=18542</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=18542&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Отключение при отжатии модификаторов shift, alt, ctrl в скрипте».]]></description>
		<lastBuildDate>Fri, 09 Jan 2026 14:59:06 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Отключение при отжатии модификаторов shift, alt, ctrl в скрипте]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=163018#p163018</link>
			<description><![CDATA[<p>Сам разобрался, спасибо нейросетке, ахренительная штука, всем советую.</p>]]></description>
			<author><![CDATA[null@example.com (sirusianin)]]></author>
			<pubDate>Fri, 09 Jan 2026 14:59:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=163018#p163018</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Отключение при отжатии модификаторов shift, alt, ctrl в скрипте]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=163014#p163014</link>
			<description><![CDATA[<p>Доброго времени суток. Купил у человека скрипт для игры. Функционал простой, он спамит зажатую мной кнопку. Почти сразу столкнулся с проблемой, при использовании модификаторов. Зажимаю кнопку 1, идет заспам, зажимаю 2 не отпуская 1, скрипт переключается и идет заспам 2, отпускаю 2, возвращается спам 1. Но если жать shift+1 и отпустить shift чуть раньше 1, то скрипт начинает спамить 1, и это полностью ломает смысл использования. Обратился к человеку, он сказал, что это работает так и никак иначе. Возможно ли сделать так, чтобы при отпускании shift, alt, ctrl кнопка в сочетании с которой они были нажаты не начинала заспам, а скрипт останавливался, до новой команды?<br /></p><div class="codebox"><pre><code>#InstallKeybdHook
#InstallMouseHook

isInUse = 0
delay = 80

RepeatPress( key ) {
	global isInUse
	global delay

	loop {
		if not GetKeyState( key, &quot;P&quot; ){
			break
		}

		if not isInUse  {
			Send, {%key%}
		}

		sleep delay
	}
	return
}

RepeatPressCtrl( key ){
	global isInUse = 1
	global delay

	loop {
		if not GetKeyState( key, &quot;P&quot; ) {
			isInUse = 0
			break
		}

		if GetKeyState( &quot;Ctrl&quot;, &quot;P&quot; ) {
			Send, ^{%key%}
		}

		sleep delay
	}
	return
}

RepeatPressShift( key ) {
	global isInUse = 1
	global delay

	loop {
		if not GetKeyState( key, &quot;P&quot; ) {
			isInUse = 0
			break
		}

		if GetKeyState( &quot;Shift&quot;, &quot;P&quot; ){
			Send, +{%key%}
		}

		sleep delay
	}
	return
}

RepeatPressBlind( key, special_delay ) {
	global delay
	
	loop {
		if not GetKeyState( key, &quot;P&quot; ) {
			break
		}

		Send, {Blind}{%key%}
		;sleep delay
		sleep special_delay
	}
	return
}

RepeatPressRedirect( holdKey, sendKey ) {
	global delay
	
	loop {
		if not GetKeyState( holdKey, &quot;P&quot; ) {
			break
		}

		Send, {Blind}{%sendKey%}
		sleep delay
	}
	return
}


#IfWinActive, World of Warcraft
~Enter::Suspend
#IfWinActive

*Pause::Suspend
;~Enter::Suspend


F1::RepeatPressBlind( &quot;F1&quot;, delay )
F2::RepeatPressBlind( &quot;F2&quot;, delay )
F3::RepeatPressBlind( &quot;F3&quot;, delay )
F4::RepeatPressBlind( &quot;F4&quot;, delay )
F5::RepeatPressBlind( &quot;F5&quot;, delay )
F6::RepeatPressBlind( &quot;F6&quot;, delay )
F7::RepeatPressBlind( &quot;F7&quot;, delay )
F8::RepeatPressBlind( &quot;F8&quot;, delay )

*1::RepeatPressBlind( &quot;1&quot;, delay )
*2::RepeatPressBlind( &quot;2&quot;, delay )
*3::RepeatPressBlind( &quot;3&quot;, delay )
*4::RepeatPressBlind( &quot;4&quot;, 10 )
*5::RepeatPressBlind( &quot;5&quot;, delay )
*6::RepeatPressBlind( &quot;6&quot;, delay )
*7::RepeatPressBlind( &quot;7&quot;, delay )
; *8::RepeatPressBlind( &quot;8&quot;, delay )
; *9::RepeatPressBlind( &quot;9&quot;, delay )
; *0::RepeatPressBlind( &quot;0&quot;, delay )

*q::RepeatPressBlind( &quot;q&quot;, delay )
; *s::RepeatPressBlind( &quot;s&quot;, delay )
*e::RepeatPressBlind( &quot;e&quot;, delay )

*r::RepeatPressBlind( &quot;r&quot;, delay )
*t::RepeatPressBlind( &quot;t&quot;, 160 )
*y::RepeatPressBlind( &quot;y&quot;, delay )

*f::RepeatPressBlind( &quot;f&quot;, delay )
*g::RepeatPressBlind( &quot;g&quot;, delay )
*h::RepeatPressBlind( &quot;h&quot;, delay )

*z::RepeatPressBlind( &quot;z&quot;, delay )
*x::RepeatPressBlind( &quot;x&quot;, delay )
*c::RepeatPressBlind( &quot;c&quot;, delay )
*v::RepeatPressBlind( &quot;v&quot;, delay )
*b::RepeatPressBlind( &quot;b&quot;, delay )
; *n::RepeatPressBlind( &quot;n&quot;, delay )</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (sirusianin)]]></author>
			<pubDate>Wed, 07 Jan 2026 22:59:53 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=163014#p163014</guid>
		</item>
	</channel>
</rss>
