<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Blind]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=15539&amp;type=atom" />
	<updated>2020-07-25T13:28:14Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15539</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Blind]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141032#p141032" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>__Михаил__ пишет:</cite><blockquote><p>Вывод - дело в вас!</p></blockquote></div><p>Конечно. Кодинг не для меня. Я просто использую его для достижения своих целей.</p>]]></content>
			<author>
				<name><![CDATA[fgslm]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40966</uri>
			</author>
			<updated>2020-07-25T13:28:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141032#p141032</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Blind]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141031#p141031" />
			<content type="html"><![CDATA[<p><strong>fgslm</strong></p><p>Почему-то у большинства справки хватает на 80% заполнить знания у вас нет.<br />Вывод - дело в вас!</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2020-07-25T13:11:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141031#p141031</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Blind]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141030#p141030" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>fgslm пишет:</cite><blockquote><p>Ну то есть её можно обозначить Kluchik?</p></blockquote></div><p>Можно как хотите, но лучше названия переменных подбирать так, чтобы было понятно, что там.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-07-25T12:59:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141030#p141030</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Blind]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141029#p141029" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>key — переменная,</p></blockquote></div><p>Ну то есть её можно обозначить Kluchik? короче<br /></p><div class="quotebox"><cite>__Михаил__ пишет:</cite><blockquote><p>Вера в то, что всё разжуют?</p></blockquote></div><p>Ну вы ведь еще живые? Как пройдёт атомная война, исчезнут все люди, тогда ничего не останется как пользоваться мёртвой справкой, как наследием их былого величия.</p>]]></content>
			<author>
				<name><![CDATA[fgslm]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40966</uri>
			</author>
			<updated>2020-07-25T12:56:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141029#p141029</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Blind]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141028#p141028" />
			<content type="html"><![CDATA[<p>Что мешает в поиске найти: <a href="http://www.script-coding.com/AutoHotkey/Variables.1.0.46.07.html">Переменные и выражения.</a><br />Вера в то, что всё разжуют?</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2020-07-25T12:53:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141028#p141028</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Blind]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141027#p141027" />
			<content type="html"><![CDATA[<p><em>key</em> — переменная, в которой сохраняется то, что возвращает функция <em>GetModifierState()</em>. А возвращает она первую клавишу из списка, статус которой определяется как &quot;нажатая&quot;. То-есть, в переменной <em>key</em> находится тот модификатор, который был нажат.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-07-25T12:51:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141027#p141027</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Blind]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141025#p141025" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Вот так можно по любому указанному в списке:<br /></p><div class="codebox"><pre><code>modifiers := [&quot;Alt&quot;, &quot;Shift&quot;, &quot;Ctrl&quot;] ; здесь указываете нужные модификаторы
Loop {
   Loop {
      ToolTip a
      Sleep, 300
      if key := GetModifierState(modifiers)
         break
      ToolTip b
      Sleep 300
      if key := GetModifierState(modifiers)
         break
      ToolTip c
      Sleep, 300
      if key := GetModifierState(modifiers)
         break
   }
   KeyWait, % key
}

GetModifierState(arr) {
   for k, v in arr
      if GetKeyState(v, &quot;P&quot;)
         Return v
}</code></pre></div></blockquote></div><p>Как расшифровать участок кода начиная от&nbsp; <strong>KeyWait, % key</strong><br /><strong>Key</strong> зарезервированная переменная? Или её можно переименовать? У меня ниже есть еще переменные с такми названием.</p><div class="quotebox"><cite>fgslm пишет:</cite><blockquote><p>if key := GetModifierState(modifiers) break</p></blockquote></div><p>Не возобновляет работу цикла после отпуска модификатора.</p>]]></content>
			<author>
				<name><![CDATA[fgslm]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40966</uri>
			</author>
			<updated>2020-07-25T12:41:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141025#p141025</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Blind]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=140896#p140896" />
			<content type="html"><![CDATA[<p>Вобщем пока сделал такой скрипт:<br />Но он не работает, и ругается то на else, то на break - не там стоит, не то закрывают, не там скобка, не там ретурн. Черт ногу сломит.<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#InstallKeybdHook
#InstallMouseHook

check := 0
Loop
if check &gt; 0 
break
else
{ 
toggle := GetKeyState(&quot;Capslock&quot;, &quot;T&quot;)
if toggle = 0
Suspend
	a := 1
	if a &gt;  0 
	{
		Send {1}
        sleep 0
     return ;куда возвращает этот ретурн
    }
    if check &gt; 0 ; после каждого действия проверяеться условие на прерывание цикла
    break
	b := 1
	if b &gt; 0
	{
		Send {2}
        sleep 0
    return
    }
    if check &gt; 0
    break
    c := 1
	if c &gt; 0
	{
		Send {3}
        sleep 0
     return
	}

    if check &gt; 0
    break
}
return

GlobalSuspend(){
loop{
toggle := GetKeyState(&quot;Capslock&quot;, &quot;T&quot;)
toggle2 := GetKeyState(&quot;Numlock&quot;, &quot;T&quot;)
toggle3 := GetKeyState(&quot;Scrolllock&quot;, &quot;T&quot;)
if toggle = 0{
Suspend, On
Pause, On
a := 1
}
if not toggle{
Suspend, Off
Pause, Off
a := 0
break
}
}
}
Critical
global toggle := GetKeyState(&quot;Capslock&quot;, &quot;T&quot;) ;включенность капс
global toggle2 := GetKeyState(&quot;Numlock&quot;, &quot;T&quot;)
global toggle3 := GetKeyState(&quot;Scrolllock&quot;, &quot;T&quot;)
isInUse = 0
RepeatPress( key ){
global isInUse
loop {
if not GetKeyState( key, &quot;P&quot; ){
break
}
if not isInUse  {
SendInput {%key%}
}
sleep 10
}
return
}

RepeatPressBlind( key ){
loop {
if not GetKeyState( key, &quot;P&quot; ){
break
}
SendInput {Blind}{%key%}
sleep 10
}
return
}
RepeatPressRedirect( holdKey, sendKey ){
loop {
if not GetKeyState( holdKey, &quot;P&quot; ){
break
}
SendInput {Blind}{%sendKey%}
sleep 10
}
return
}
*sc2::RepeatPressBlind( &quot;sc2&quot; )
*sc3::RepeatPressBlind( &quot;sc3&quot; )
return
</code></pre></div></div></div>]]></content>
			<author>
				<name><![CDATA[fgslm]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40966</uri>
			</author>
			<updated>2020-07-24T05:17:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=140896#p140896</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Blind]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=140887#p140887" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><div class="codebox"><pre><code>Loop {
   Loop {
      ToolTip a
      Sleep, 300
      if GetKeyState(&quot;Alt&quot;, &quot;P&quot;)
         break
      ToolTip b
      Sleep 300
      if GetKeyState(&quot;Alt&quot;, &quot;P&quot;)
         break
      ToolTip c
      Sleep, 300
      if GetKeyState(&quot;Alt&quot;, &quot;P&quot;)
         break
   }
   KeyWait, Alt
}</code></pre></div></blockquote></div><p>почему <br /> KeyWait, Alt<br />стоит в конце цикла? Ведь если я нажму модификатор - цикл как минимум 1 раз пройдёт?</p>]]></content>
			<author>
				<name><![CDATA[fgslm]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40966</uri>
			</author>
			<updated>2020-07-23T19:46:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=140887#p140887</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Blind]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=140886#p140886" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>__Михаил__ пишет:</cite><blockquote><p> после каждой итерации</p></blockquote></div><p>Щас только подумал. У меня там 50 интераций, если я к каждому добавлю проверку, код станет тяжелее еще на + 50 строк... Хз<br /></p><div class="codebox"><pre><code>Глабальная функция прерывания(111)
Если я нажал там че-то то 
&quot;Цикл астанавись!!!&quot;
end</code></pre></div><p>А потом Условие запуска цикла вообще должно быть<br />Как<br /></p><div class="codebox"><pre><code>while (пока глобальная функция прерывания не активирована)
{
выпалнять этот код ааа
111
}
выхд
Returnx</code></pre></div>]]></content>
			<author>
				<name><![CDATA[fgslm]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40966</uri>
			</author>
			<updated>2020-07-23T19:34:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=140886#p140886</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Blind]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=140885#p140885" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>svoboden пишет:</cite><blockquote><p>F6:: While !GetKeyState(&quot;Alt&quot;, &quot;P&quot;) { ToolTip b</p></blockquote></div><p>Ну, если взять <br /></p><div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>modifiers := [&quot;Alt&quot;, &quot;Shift&quot;, &quot;Ctrl&quot;]</p></blockquote></div><div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>if key := GetModifierState(modifiers) break</p></blockquote></div><p>и<br /></p><div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>GetModifierState(arr) { for k, v in arr if GetKeyState(v, &quot;P&quot;) Return v</p></blockquote></div><p>и прерывать этим. То наверное. Но я пока не знаю как собрать всё это вместе.<br />Хотя сомневаюсь, Условие запуска цикла по GetKeyState(&quot;Numlock&quot;, &quot;T&quot;) же не работает.</p>]]></content>
			<author>
				<name><![CDATA[fgslm]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40966</uri>
			</author>
			<updated>2020-07-23T19:32:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=140885#p140885</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Blind]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=140884#p140884" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>GetModifierState(arr) { for k, v in arr if GetKeyState(v, &quot;P&quot;) Return v</p></blockquote></div><p>Так. Эта функция ссылается на обход бесконечного массива внутри этого цикла<br />Но у меня то еще проверка нажатия клавиш - которые расположены <strong>ЗА</strong> этим циклом т.е. если взять примерно<br />повтор нажатия<br /></p><div class="codebox"><pre><code>RepeatPressBlind( key ){
loop {
if not GetKeyState( key, &quot;P&quot; ){
break
}
SendInput {Blind}{%key%}
sleep 10
}
return
}
sc13::RepeatPressBlind( &quot;sc13&quot; )</code></pre></div><p>То куда его нужно поставить, чтобы функция обхода массива проверки модификаторов охватывала и его тоже?</p>]]></content>
			<author>
				<name><![CDATA[fgslm]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40966</uri>
			</author>
			<updated>2020-07-23T19:08:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=140884#p140884</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Blind]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=140883#p140883" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Loop { Loop {</p></blockquote></div><p>Но почему-то он у меня не хочет работать с 2-мя циклами.<br />Там же нужно проверку на нажатие клавиш<br />А она берется отсюда:<br /></p><div class="codebox"><pre><code>RepeatPressBlind( key ){
loop {
if not GetKeyState( key, &quot;P&quot; ){
break
}
Send, {Blind}{%key%}
sleep 1
}
return
}</code></pre></div><p>И вот теперь диллема - куда поставить эту часть кода, чтобы она не блокировала саму работу цикла. потому что с 2-мя циклами внутренний вообще не работает.<br />--------------<br />А что обозначает&nbsp; <br /></p><div class="codebox"><pre><code>KeyWait, % key</code></pre></div><p>просто непонятно откуда оно взялось, и на что ссылается?</p>]]></content>
			<author>
				<name><![CDATA[fgslm]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40966</uri>
			</author>
			<updated>2020-07-23T18:52:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=140883#p140883</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Blind]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=140882#p140882" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>modifiers := [&quot;Alt&quot;, &quot;Shift&quot;, &quot;Ctrl&quot;] ; здесь указываете нужные модификаторы Loop { Loop { ToolTip a Sleep, 300 if key := GetModifierState(modifiers) break</p></blockquote></div><p>Ну вот - Вот! то что я от вас просил!</p>]]></content>
			<author>
				<name><![CDATA[fgslm]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40966</uri>
			</author>
			<updated>2020-07-23T18:39:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=140882#p140882</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Blind]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=140881#p140881" />
			<content type="html"><![CDATA[<p>Вот так можно по любому указанному в списке:<br /></p><div class="codebox"><pre><code>modifiers := [&quot;Alt&quot;, &quot;Shift&quot;, &quot;Ctrl&quot;] ; здесь указываете нужные модификаторы
Loop {
   Loop {
      ToolTip a
      Sleep, 300
      if key := GetModifierState(modifiers)
         break
      ToolTip b
      Sleep 300
      if key := GetModifierState(modifiers)
         break
      ToolTip c
      Sleep, 300
      if key := GetModifierState(modifiers)
         break
   }
   KeyWait, % key
}

GetModifierState(arr) {
   for k, v in arr
      if GetKeyState(v, &quot;P&quot;)
         Return v
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-07-23T18:38:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=140881#p140881</id>
		</entry>
</feed>
