<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Проблема с русской раскладкой]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=6280&amp;type=atom" />
	<updated>2011-10-04T11:13:33Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=6280</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема с русской раскладкой]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=52159#p52159" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>hohmuch пишет:</cite><blockquote><p>...сделать чтобы при включении кода он сразу начинал посылать &quot;g&quot;, а то на данный момент надо нажимать &quot;выключатель&quot;.</p></blockquote></div><div class="codebox"><pre><code>vklucheno:=1
SetTimer, posylg, 3000
Return

F12::
   If vklucheno
     SetTimer, posylg, off
   Else
     SetTimer, posylg, 3000
   vklucheno := Not vklucheno
   Return

posylg:
   Send, {vk47}
   Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-10-04T11:13:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=52159#p52159</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема с русской раскладкой]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=52157#p52157" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>hohmuch пишет:</cite><blockquote><p>...как работает таймер...</p></blockquote></div><p>Таймер работает в зависимости от значения переменной <em>vklucheno</em></p><div class="codebox"><pre><code>; $ этот знак тут не нужен, ибо клавиша ф12 не посылает саму-себя
F12:: ; хоткей, по нажатию на который запускается проверка переменной &quot;vklucheno&quot;
   cnt:= ; сброс переменной-счётчика
   If vklucheno ; если переменная имеет положительное значение, что нетак, поскольку она с включением скрипта пуста
     SetTimer, posylg, off ; то, остановка таймера &quot;posylg&quot;
   Else ; или, что с певого нажатия именно и происходит
     SetTimer, posylg, 30 ; включает таймер &quot;posylg&quot; с интервалом в 30 мс (время уменьшено для наглядности работы таймера)
   vklucheno := Not vklucheno ; далее операция с присвоением, действует по принципу переключателя
   MsgBox,,, % &quot;vklucheno = &quot;vklucheno, 1 ; отображение значения переменной &quot;vklucheno&quot;
   Return

posylg: ; метка для таймера
   ++cnt ; переменная-счёчик
;   send, {vk47} ; содержимое метки
   TrayTip,, % &quot;посыл G клавиши (число раз: &quot;cnt &quot;)&quot; ; отображение работы таймера
   Return</code></pre></div><p>Другие примеры, разные в плане составления, но одинаковые по действию:</p><div class="codebox"><pre><code>F12::
   If vklucheno
   {
      vklucheno:=0
      SetTimer, posylg, off
   }
   Else
   {
      vklucheno:=1
      SetTimer, posylg, 30
   }
   Return

posylg:
   Send, {vk47}
   Return</code></pre></div><div class="codebox"><pre><code>F12::SetTimer, posylg, % (vklucheno := Not vklucheno) ? 30 : &quot;Off&quot;

posylg:
   Send, {vk47}
   Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-10-04T10:54:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=52157#p52157</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема с русской раскладкой]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=52126#p52126" />
			<content type="html"><![CDATA[<p>Пытаюсь разобраться как работает таймер, все равно не могу понять.<br /></p><div class="codebox"><pre><code>$F12::
if vklucheno
  settimer, posylg, off
else
  settimer, posylg, 3000
vklucheno := not vklucheno
return
posylg:
send, {vk47}
return</code></pre></div><p>Кажется, что если кнопка не нажата, то таймер должен работать, а если нажата то послать g и отключиться.</p>]]></content>
			<author>
				<name><![CDATA[hohmuch]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27176</uri>
			</author>
			<updated>2011-10-03T16:35:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=52126#p52126</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема с русской раскладкой]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=52123#p52123" />
			<content type="html"><![CDATA[<p>Спасибо большое, заодно подчитнул про виртуальные клавиши. </p><p>А вы можете сделать чтобы при включении кода он сразу начинал посылать &quot;g&quot;, а то на данный момент надо нажимать &quot;выключатель&quot;. Не могу понять как это сделать.</p>]]></content>
			<author>
				<name><![CDATA[hohmuch]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27176</uri>
			</author>
			<updated>2011-10-03T15:15:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=52123#p52123</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема с русской раскладкой]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=52121#p52121" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>$vk47::
if running
  settimer, sendkey, off
else
  settimer, sendkey, 3000
running := !running
return

sendkey:
send, {vk47}
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2011-10-03T14:10:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=52121#p52121</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Проблема с русской раскладкой]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=52120#p52120" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>;toggle key
$g::
if running
  settimer, sendkey, off
else
  settimer, sendkey, 3000
running := !running
return


sendkey:
send, g
return</code></pre></div><p><a href="http://fastpic.ru/"><span class="postimg"><img src="http://i32.fastpic.ru/big/2011/0929/25/b7bdc313926e929e090283705b94c625.jpg" alt="http://i32.fastpic.ru/big/2011/0929/25/b7bdc313926e929e090283705b94c625.jpg" /></span></a></p>]]></content>
			<author>
				<name><![CDATA[hohmuch]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27176</uri>
			</author>
			<updated>2011-10-03T13:40:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=52120#p52120</id>
		</entry>
</feed>
