<?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=8653&amp;type=atom" />
	<updated>2013-09-06T15:39:42Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8653</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запуск скрипта любой комбинацией]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75245#p75245" />
			<content type="html"><![CDATA[<p>Спасибо. Сейчас буду пробывать.</p>]]></content>
			<author>
				<name><![CDATA[Ya ]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27862</uri>
			</author>
			<updated>2013-09-06T15:39:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75245#p75245</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запуск скрипта любой комбинацией]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75240#p75240" />
			<content type="html"><![CDATA[<p>А вот чтобы снимать так с Pause, код надо запускать отдельным скриптом.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-05T20:58:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75240#p75240</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запуск скрипта любой комбинацией]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75239#p75239" />
			<content type="html"><![CDATA[<p>Повторное действие только после отпускания Ctrl:<br /></p><div class="codebox"><pre><code>
SetBatchLines -1
Hook := DllCall(&quot;SetWindowsHookEx&quot; . (A_IsUnicode ? &quot;W&quot; : &quot;A&quot;)
        , Int, 13 ; WH_KEYBOARD_LL := 13
        , Ptr, RegisterCallback(&quot;LowLevelKeyboardProc&quot;, &quot;Fast&quot;)
        , Ptr, DllCall(&quot;GetModuleHandle&quot;, UInt, 0, Ptr)
        , UInt, 0, Ptr)
OnExit, Exit 
Return

CtrlKEYDOWN:
    ToolTip Ctrl &amp;&amp; KEYDOWN
    Return
 
LowLevelKeyboardProc(nCode, wParam, lParam)  {
    Static KEYDOWN, Ctrl, CtrlUP
    SaveFormat := A_FormatInteger
    SetFormat, IntegerFast, H
    VkCode := NumGet(lParam+0, 0, &quot;UInt&quot;)
    
    IF (wParam = 0x100 || wParam = 0x104)    ;    WM_KEYDOWN := 0x100, WM_SYSKEYDOWN := 0x104
    {
        IF (VkCode = 0xA2 || VkCode = 0xA3) 
            Ctrl := 1
        Else
            KEYDOWN := 1 
    }
    
    Else IF (wParam = 0x101 || wParam = 0x105)  ;  WM_KEYUP := 0x101, WM_SYSKEYUP := 0x105 
    {
        IF (VkCode = 0xA2 || VkCode = 0xA3)
            Ctrl := CtrlUP := 0
        Else
            KEYDOWN := 0 
    }
 
    IF (Ctrl &amp;&amp; KEYDOWN  &amp;&amp; !CtrlUP)
    {
        CtrlUP := 1
        SetTimer CtrlKEYDOWN, -10
    }
    SetFormat, IntegerFast, %SaveFormat%
    Return DllCall(&quot;CallNextHookEx&quot;, Ptr, 0, Int, nCode, UInt, wParam, UInt, lParam) 
}

Exit:
    DllCall(&quot;UnhookWindowsHookEx&quot;, Ptr, Hook)
    ExitApp 
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-05T20:44:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75239#p75239</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запуск скрипта любой комбинацией]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75238#p75238" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
SetBatchLines -1
Hook := DllCall(&quot;SetWindowsHookEx&quot; . (A_IsUnicode ? &quot;W&quot; : &quot;A&quot;)
        , Int, 13 ; WH_KEYBOARD_LL := 13
        , Ptr, RegisterCallback(&quot;LowLevelKeyboardProc&quot;, &quot;Fast&quot;)
        , Ptr, DllCall(&quot;GetModuleHandle&quot;, UInt, 0, Ptr)
        , UInt, 0, Ptr)
OnExit, Exit 
Return
 
CtrlKEYDOWN:
    ToolTip Ctrl &amp;&amp; KEYDOWN
    Return

LowLevelKeyboardProc(nCode, wParam, lParam)  {
    Static KEYDOWN, Ctrl
    SaveFormat := A_FormatInteger
    SetFormat, IntegerFast, H
    VkCode := NumGet(lParam+0, 0, &quot;UInt&quot;)
       
    IF (wParam = 0x100 || wParam = 0x104)    ;    WM_KEYDOWN := 0x100, WM_SYSKEYDOWN := 0x104
    {
        IF (VkCode = 0xA2 || VkCode = 0xA3)
            Ctrl := 1
        Else
            KEYDOWN := 1 
    }
    
    Else IF (wParam = 0x101 || wParam = 0x105)  ;  WM_KEYUP := 0x101, WM_SYSKEYUP := 0x105 
    {
        IF (VkCode = 0xA2 || VkCode = 0xA3)
            Ctrl := 0
        Else
            KEYDOWN := 0 
    }
    
    IF (Ctrl &amp;&amp; KEYDOWN)
        SetTimer CtrlKEYDOWN, -10 
    SetFormat, IntegerFast, %SaveFormat%
    Return DllCall(&quot;CallNextHookEx&quot;, Ptr, 0, Int, nCode, UInt, wParam, UInt, lParam) 
}

Exit:
    DllCall(&quot;UnhookWindowsHookEx&quot;, Ptr, Hook)
    ExitApp 
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-05T20:35:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75238#p75238</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запуск скрипта любой комбинацией]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75235#p75235" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>любой комбинацией с кнопкой CTRL</code></pre></div><p>Ctrl+любая кнопка<br />Любая кнопка+Ctrl<br />Удерживание Ctrl+любая кнопка<br />Удерживание любой кнопки+Ctrl</p>]]></content>
			<author>
				<name><![CDATA[Ya ]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27862</uri>
			</author>
			<updated>2013-09-05T18:24:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75235#p75235</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запуск скрипта любой комбинацией]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75233#p75233" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
*RCtrl::
*LCtrl:: Pause
</code></pre></div><br /><p>Что значит:<br /></p><div class="quotebox"><blockquote><p>любой комбинацией с кнопкой CTRL</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-05T18:11:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75233#p75233</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запуск скрипта любой комбинацией]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75232#p75232" />
			<content type="html"><![CDATA[<p>Нет. Паузу вообще игнорирует. Нужно чтобы скрипт, снимался и ставился на паузу любой комбинацией с кнопкой CTRL</p>]]></content>
			<author>
				<name><![CDATA[Ya ]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27862</uri>
			</author>
			<updated>2013-09-05T18:07:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75232#p75232</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запуск скрипта любой комбинацией]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75231#p75231" />
			<content type="html"><![CDATA[<p>Что заработало?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-05T17:50:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75231#p75231</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запуск скрипта любой комбинацией]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75230#p75230" />
			<content type="html"><![CDATA[<p>Просите, я не совсем правильно выразился. <br />Конторол ставит/снимает скрипт с паузы. То есть, строка такая <br /></p><div class="codebox"><pre><code>Control::Pause</code></pre></div><p>Как ее отредактировать правильно, чтобы заработало?</p>]]></content>
			<author>
				<name><![CDATA[Ya ]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27862</uri>
			</author>
			<updated>2013-09-05T17:41:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75230#p75230</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запуск скрипта любой комбинацией]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75229#p75229" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
*RCtrl::
*LCtrl:: ToolTip ToolTip 
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-05T17:22:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75229#p75229</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запуск скрипта любой комбинацией]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75228#p75228" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p><span style="color: #008800"><strong>Ya </strong>, ознакомьтесь с <a href="http://forum.script-coding.com/viewtopic.php?id=6148">этой</a> темой, отредактируйте заголовок.</span></p></blockquote></div><p>Простите, забылся.</p>]]></content>
			<author>
				<name><![CDATA[Ya ]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27862</uri>
			</author>
			<updated>2013-09-05T17:13:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75228#p75228</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запуск скрипта любой комбинацией]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75227#p75227" />
			<content type="html"><![CDATA[<p><span style="color: #008800"><strong>Ya </strong>, ознакомьтесь с <a href="http://forum.script-coding.com/viewtopic.php?id=6148">этой</a> темой, отредактируйте заголовок.</span></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2013-09-05T17:05:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75227#p75227</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Запуск скрипта любой комбинацией]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75226#p75226" />
			<content type="html"><![CDATA[<p>В общем, есть скрипт, который запускается кнопкой CTRL, но не это не всегда удобно. Хотелось бы добавить возможность запускать скрипт любой комбинацией с кнопкой CTRL</p>]]></content>
			<author>
				<name><![CDATA[Ya ]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27862</uri>
			</author>
			<updated>2013-09-05T17:01:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75226#p75226</id>
		</entry>
</feed>
