<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; «AHK: Зажатие клавиши и присвоение переменной значения».]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=9531</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=9531&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме ««AHK: Зажатие клавиши и присвоение переменной значения».».]]></description>
		<lastBuildDate>Thu, 24 Apr 2014 10:46:17 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: «AHK: Зажатие клавиши и присвоение переменной значения».]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=82244#p82244</link>
			<description><![CDATA[<p><span style="color: #008800"><strong>amigos8572</strong>, ознакомьтесь с <a href="http://forum.script-coding.com/viewtopic.php?id=6148">этой</a> темой, отредактируйте заголовок.</span></p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 24 Apr 2014 10:46:17 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=82244#p82244</guid>
		</item>
		<item>
			<title><![CDATA[Re: «AHK: Зажатие клавиши и присвоение переменной значения».]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=82240#p82240</link>
			<description><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Ну если одной строкой, то:<br /></p><div class="codebox"><pre><code>Shift:: Send, % (State1 := !State1) ? &quot;{Shift Down}&quot; (a := 1) / 0 : &quot;{Shift Up}&quot; (a := 2) / 0</code></pre></div></blockquote></div><p>Спасибо большое!</p>]]></description>
			<author><![CDATA[null@example.com (amigos8572)]]></author>
			<pubDate>Thu, 24 Apr 2014 10:21:03 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=82240#p82240</guid>
		</item>
		<item>
			<title><![CDATA[Re: «AHK: Зажатие клавиши и присвоение переменной значения».]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=82237#p82237</link>
			<description><![CDATA[<p><strong>АНК: </strong> к заголовку добавьте.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Thu, 24 Apr 2014 09:44:42 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=82237#p82237</guid>
		</item>
		<item>
			<title><![CDATA[Re: «AHK: Зажатие клавиши и присвоение переменной значения».]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=82236#p82236</link>
			<description><![CDATA[<p>Ну если одной строкой, то:<br /></p><div class="codebox"><pre><code>Shift:: Send, % (State1 := !State1) ? &quot;{Shift Down}&quot; (a := 1) / 0 : &quot;{Shift Up}&quot; (a := 2) / 0</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Thu, 24 Apr 2014 09:43:11 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=82236#p82236</guid>
		</item>
		<item>
			<title><![CDATA[«AHK: Зажатие клавиши и присвоение переменной значения».]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=82235#p82235</link>
			<description><![CDATA[<p>Здравствуйте!<br />Прошу, расскажите как можно в скрипте <br /></p><div class="codebox"><pre><code>Shift:: Send, % (State1 := !State1)? &quot;{Shift Down}&quot;:&quot;{Shift Up}&quot; </code></pre></div><p>Добавить присвоение переменной &quot;а&quot; значения 1 при нажатии шифта, и 2 при отжатии.<br />Т.е. нажал один раз Шифт и он зажимается, а переменной &quot;а&quot; присваивается 1.<br />При повторном нажатии Шифта, Шифт отжимается, а переменной &quot;а&quot; присваивается 2.<br />В этом скрипте реализовано только нажатие, отжатие Шифта.</p><p>Скрипты подобного типа:<br /></p><div class="codebox"><pre><code>Shift:: 
    If isKeyPressed := !isKeyPressed     
        SetTimer, SendA, 40              
    Else 
    { 
        SetTimer, SendA, Off            
        Send {LShift Up}   
        Send {H Up}      
    } 
    KeyWait Shift                      
    return 
 
SendA: 
    Send {LShift Down} 
    Send {H Down} 
    return </code></pre></div><p>и<br /></p><div class="codebox"><pre><code>toggle = 0  
#MaxThreadsPerHotkey 2  
 Shift::  
 Toggle := !Toggle  
 If Toggle 
{  
While Toggle 
{ 
SendInput, {LShift Down} 
SendInput, {sc014} 
 }  
} 
else  
{  
SendInput, {LShift Up} 
SendInput, {sc015} 
 } 
 return </code></pre></div><p>- тут добавлены буквы для понимания срабатывания шифта.<br />Эти 2 скрипта выключают Шифт через раз. И понять с чем это я связано я не смог. Может нажимал Шифт, когда скрипт выполнял другую часть скрипта, а не определял нажат ли Шифт.</p>]]></description>
			<author><![CDATA[null@example.com (amigos8572)]]></author>
			<pubDate>Thu, 24 Apr 2014 09:35:19 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=82235#p82235</guid>
		</item>
	</channel>
</rss>
