<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Статус цифр при вводе hotstring]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11951&amp;type=atom" />
	<updated>2016-08-28T12:24:20Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11951</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Статус цифр при вводе hotstring]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=107103#p107103" />
			<content type="html"><![CDATA[<p>Спасибо. Пока как временное решение закомментировал этот перехват. </p><div class="quotebox"><blockquote><p>; $1:: <br />; $2:: <br />; $3:: <br />; $4:: <br />; $5:: <br />; $6:: <br />; $7:: <br />; $8:: <br />; $9:: <br />; $0::<br />; CheckWord(A_ThisHotkey)<br />; Return</p></blockquote></div><p>Потом подумаю как его включать после того, как окно списка из предложений будет появляться.</p><p>Спасибо за ценные комментарии.</p>]]></content>
			<author>
				<name><![CDATA[akhill]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32654</uri>
			</author>
			<updated>2016-08-28T12:24:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=107103#p107103</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Статус цифр при вводе hotstring]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=107102#p107102" />
			<content type="html"><![CDATA[<p>Скрипт typingAid.ahk перехватывает нажатия клавиш-цифр. Поэтому скрипт из первого сообщения не узнаёт об их нажатии.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2016-08-28T11:51:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=107102#p107102</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Статус цифр при вводе hotstring]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=107100#p107100" />
			<content type="html"><![CDATA[<p>Вот фрагмент из typingAid.ahk</p><div class="quotebox"><blockquote><p>$1:: <br />$2:: <br />$3:: <br />$4:: <br />$5:: <br />$6:: <br />$7:: <br />$8:: <br />$9:: <br />$0::<br />CheckWord(A_ThisHotkey)<br />Return</p></blockquote></div><p>По идее CheckWord должен вернуть состояние, которое он изменяет в своем теле, чего он не делает по всей видимости.<br />Какое это может быть состояние и с помощью чего можно управлять возможностью вызова хоткея из хотстринга?&nbsp; </p><div class="codebox"><pre><code>
; If hotkey was pressed, check wether there&#039;s a match going on and send it, otherwise send the number(s) typed 
CheckWord(Key)
{
   global g_ListBox_Id
   global g_Match
   global g_MatchStart
   global g_NumKeyMethod
   global g_SingleMatch
   global g_Word
   global prefs_ListBoxRows
   global prefs_NumPresses
   
   StringRight, Key, Key, 1 ;Grab just the number pushed, trim off the &quot;$&quot;
   
   IfEqual, Key, 0
   {
      WordIndex := g_MatchStart + 9
   } else {
            WordIndex := g_MatchStart - 1 + Key
         }  
   
   IfEqual, g_NumKeyMethod, Off
   {
      SendCompatible(Key,0)
      ProcessKey(Key,&quot;&quot;)
      Return
   }
   
   IfEqual, prefs_NumPresses, 2
      SuspendOn()

   ; If active window has different window ID from before the input, blank word 
   ; (well, assign the number pressed to the word) 
   if !(ReturnWinActive())
   { 
      SendCompatible(Key,0)
      ProcessKey(Key,&quot;&quot;)
      IfEqual, prefs_NumPresses, 2
         SuspendOff()
      Return 
   } 
   
   if ReturnLineWrong() ;Make sure we are still on the same line
   { 
      SendCompatible(Key,0)
      ProcessKey(Key,&quot;&quot;) 
      IfEqual, prefs_NumPresses, 2
         SuspendOff()
      Return 
   } 

   IfNotEqual, g_Match, 
   {
      ifequal, g_ListBox_Id,        ; only continue if match is not empty and list is showing
      { 
         SendCompatible(Key,0)
         ProcessKey(Key,&quot;&quot;)
         IfEqual, prefs_NumPresses, 2
            SuspendOff()
         Return 
      }
   }

   ifequal, g_Word,        ; only continue if g_word is not empty 
   { 
      SendCompatible(Key,0)
      ProcessKey(Key,&quot;&quot;)
      IfEqual, prefs_NumPresses, 2
         SuspendOff()
      Return 
   }
      
   if ( ( (WordIndex + 1 - MatchStart) &gt; prefs_ListBoxRows) || ( g_Match = &quot;&quot; ) || (g_SingleMatch[WordIndex] = &quot;&quot;) )   ; only continue g_SingleMatch is not empty 
   { 
      SendCompatible(Key,0)
      ProcessKey(Key,&quot;&quot;)
      IfEqual, prefs_NumPresses, 2
         SuspendOff()
      Return 
   }

   IfEqual, prefs_NumPresses, 2
   {
      Input, KeyAgain, L1 I T0.5, 1234567890
      
      ; If there is a timeout, abort replacement, send key and return
      IfEqual, ErrorLevel, Timeout
      {
         SendCompatible(Key,0)
         ProcessKey(Key,&quot;&quot;)
         SuspendOff()
         Return
      }

      ; Make sure it&#039;s an EndKey, otherwise abort replacement, send key and return
      IfNotInString, ErrorLevel, EndKey:
      {
         SendCompatible(Key . KeyAgain,0)
         ProcessKey(Key,&quot;&quot;)
         ProcessKey(KeyAgain,&quot;&quot;)
         SuspendOff()
         Return
      }
   
      ; If the 2nd key is NOT the same 1st trigger key, abort replacement and send keys   
      IfNotInString, ErrorLevel, %Key%
      {
         StringTrimLeft, KeyAgain, ErrorLevel, 7
         SendCompatible(Key . KeyAgain,0)
         ProcessKey(Key,&quot;&quot;)
         ProcessKey(KeyAgain,&quot;&quot;)
         SuspendOff()
         Return
      }

      ; If active window has different window ID from before the input, blank word 
      ; (well, assign the number pressed to the word) 
      if !(ReturnWinActive())
      { 
         SendCompatible(Key . KeyAgain,0)
         ProcessKey(Key,&quot;&quot;)
         ProcessKey(KeyAgain,&quot;&quot;)
         SuspendOff()
         Return 
      } 
   
      if ReturnLineWrong() ;Make sure we are still on the same line
      { 
         SendCompatible(Key . KeyAgain,0)
         ProcessKey(Key,&quot;&quot;)
         ProcessKey(KeyAgain,&quot;&quot;)
         SuspendOff()
         Return 
      } 
   }

   SendWord(WordIndex)
   IfEqual, prefs_NumPresses, 2
      SuspendOff()
   Return 
}

</code></pre></div><p>Спасибо за любую наводку.</p>]]></content>
			<author>
				<name><![CDATA[akhill]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32654</uri>
			</author>
			<updated>2016-08-28T09:49:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=107100#p107100</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Статус цифр при вводе hotstring]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=107083#p107083" />
			<content type="html"><![CDATA[<p>Нужно искать строки, в которых задействованы клавиши-цифры.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2016-08-27T16:57:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=107083#p107083</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Статус цифр при вводе hotstring]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=107079#p107079" />
			<content type="html"><![CDATA[<p>Соврал. Спустя время опять проявляется моя проблема. Однако когда выгрузил typingAid все нормализуется.<br />Вопрос что там надо поискать в typingAid, чтобы исправить?</p><p>Спасибо за ответы.</p>]]></content>
			<author>
				<name><![CDATA[akhill]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32654</uri>
			</author>
			<updated>2016-08-27T15:45:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=107079#p107079</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Статус цифр при вводе hotstring]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=107078#p107078" />
			<content type="html"><![CDATA[<p>Посмотрел драйверы, вроде один майкрософтовский стандартная клавиатура PS/2. Пытался его обновить но система сказала, что тот, который стоит нормальный и оптимальный на текущий момент.</p><p>Так случилось, что я выгрузил все свои ahk-файлы из памяти и затем загрузил их в другом порядке, чем они прописаны в автозапуске (не знаю правда в каком порядке они системой при загрузке беруться, может кто подскажет?). Последним там стоял, если кому приходилось сталкиваться typingAid.ahk (помощник ускоренного ввода с клавиатуры). В этот раз я его запускал первым и ситуация поменялась в нужную мне сторону. Сам typingAid.ahk довольно большой скрипт. Думаю, что дело скорее всего в нем или в директивах, которые в нем находятся.</p><p>Спасибо за ответы.</p>]]></content>
			<author>
				<name><![CDATA[akhill]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32654</uri>
			</author>
			<updated>2016-08-27T15:28:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=107078#p107078</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Статус цифр при вводе hotstring]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=107074#p107074" />
			<content type="html"><![CDATA[<p>Возможно основные цифровые клавиши имеют дополнительные функции. И стоит драйвер, который определят что Вы делаете - просто нажимаете клавиши, или с удержанием Fn. Попробуйте убрать все драйверы и приложения, предназначенные для клавиатуры.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2016-08-27T13:54:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=107074#p107074</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Статус цифр при вводе hotstring]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=107073#p107073" />
			<content type="html"><![CDATA[<p>У меня ноутбук, справа отдельно цифровые клавиши есть, нам-пад вроде так называется.</p><p>Да если вводить с цифры с этого нам-пада то все в порядке как оказывается. А привычней вводить цифры сверху. Может есть какой-то хук для этого? </p><p>Спасибо за ответы.</p>]]></content>
			<author>
				<name><![CDATA[akhill]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32654</uri>
			</author>
			<updated>2016-08-27T13:38:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=107073#p107073</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Статус цифр при вводе hotstring]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=107070#p107070" />
			<content type="html"><![CDATA[<p><strong>akhill</strong>, а у Вас клавиатуры классическая или какая-нибудь ноутбучная, урезанная?</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2016-08-27T12:59:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=107070#p107070</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Статус цифр при вводе hotstring]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=107067#p107067" />
			<content type="html"><![CDATA[<p>У меня это не воспроизводится, работает нормально.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2016-08-27T12:47:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=107067#p107067</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Статус цифр при вводе hotstring]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=107065#p107065" />
			<content type="html"><![CDATA[<p>Здравствуйте!</p><p>Нигде не нашел упоминания об этой странной для меня ситуации, когда если я ввожу последовательность символов, которая похожа на начало какой-либо хотстринг, а затем начинаю вводить последовательно сколько угодно числовых символов и завершаю этот ввод последовательностью похожей на конец этой самой хотстринг, на которую был похоже начало ввода, то хотстринг срабатывает и вводится результат.</p><p>Другими словами, у меня есть хотстринг </p><p>:?*: --:: —</p><p>т. е. пробел два дефиса заменяются на неразрывный пробел и тире.</p><p>Так получается, что я когда ввожу пробел, один дефис, затем любое последовательное количество цифр и в завершение добавляю дефис, то хотстринг срабатывает, как якобы я хотел, чтобы это происходило.<br />Таким образом получается, что цифры не являются символами которые отключают хотстринг.<br />Причем, даже если я ввнесу их в список </p><p>#Hotstring EndChars -()[]{}:;&#039;&quot;/\,.?!`n `t1234567890</p><p>ничего не меняется.</p><p>Такое поведение проявляется на почти всех моих хотстрингах.</p><p>Как решить эту проблему. Разве числа не воспринимаются как символы? Как их тогда зачислить к символам?</p><p>Спасибо за ответы.</p>]]></content>
			<author>
				<name><![CDATA[akhill]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32654</uri>
			</author>
			<updated>2016-08-27T12:24:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=107065#p107065</id>
		</entry>
</feed>
