<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: click при зажатии и перенос курсора]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10266&amp;type=atom" />
	<updated>2014-12-22T18:38:38Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10266</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: click при зажатии и перенос курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89688#p89688" />
			<content type="html"><![CDATA[<p>Теперь все просто идеально. Всем огромное спасибо за помощь.</p>]]></content>
			<author>
				<name><![CDATA[michael.gg]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32762</uri>
			</author>
			<updated>2014-12-22T18:38:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89688#p89688</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: click при зажатии и перенос курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89686#p89686" />
			<content type="html"><![CDATA[<p>Строки:</p><div class="codebox"><pre><code>for k, v in bind
    HotKey, %k%, Action </code></pre></div><p>заменить на то что выше.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-12-22T17:42:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89686#p89686</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: click при зажатии и перенос курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89685#p89685" />
			<content type="html"><![CDATA[<p>Как это по скрипту выглядеть должно? Просто как только не пробовал - не получилось.</p>]]></content>
			<author>
				<name><![CDATA[michael.gg]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32762</uri>
			</author>
			<updated>2014-12-22T17:22:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89685#p89685</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: click при зажатии и перенос курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89684#p89684" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>В версии, которая была у меня ранее, была функция &quot;#IfWinActive NAME | #IfWinActive&quot;, но в новой она видимо не работает. Какая здесь альтернатива?</p></blockquote></div><div class="codebox"><pre><code>Hotkey, IfWinActive, ahk_class Notepad
for k, v in bind
    HotKey, %k%, Action 
Hotkey, IfWinActive</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-12-22T16:35:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89684#p89684</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: click при зажатии и перенос курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89680#p89680" />
			<content type="html"><![CDATA[<p>Интересует именно первый вариант, в котором если не нажимаешь в течении секунды - то серия сбрасывается (при нажатии перенос и двойной клик, просто Вы упомянули только двойной клик). Был бы очень благодарен, если бы Вы реализовали такой скрипт <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[michael.gg]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32762</uri>
			</author>
			<updated>2014-12-22T16:03:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89680#p89680</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: click при зажатии и перенос курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89678#p89678" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>michael.gg</strong>, зачем вы опять цитируете предыдущий пост? Редактируйте снова.</span></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-12-22T15:42:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89678#p89678</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: click при зажатии и перенос курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89677#p89677" />
			<content type="html"><![CDATA[<p>В версии, которая была у меня ранее, была функция &quot;#IfWinActive NAME | #IfWinActive&quot;, но в новой она видимо не работает. Какая здесь альтернатива?</p>]]></content>
			<author>
				<name><![CDATA[michael.gg]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32762</uri>
			</author>
			<updated>2014-12-22T14:45:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89677#p89677</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: click при зажатии и перенос курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89676#p89676" />
			<content type="html"><![CDATA[<p>Это именно то, что мне нужно! Огромное спасибо. А проблема и правда была в версии AHK, извиняюсь за мою глупость. Еще раз всем огромное спасибо! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[michael.gg]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32762</uri>
			</author>
			<updated>2014-12-22T14:40:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89676#p89676</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: click при зажатии и перенос курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89674#p89674" />
			<content type="html"><![CDATA[<p><strong>michael.gg</strong>, для нормальной работы приведенного <strong>serzh82saratov</strong> кода должна быть новая версия AHK_L, которой пользуется <span style="color: white">почти</span> весь форум. Ссылка у него же в подписи.</p><p>Исправил ваш дополненный код, убрал ненужное, добавил недостающее. ))<br /></p><div class="codebox"><pre><code>bind := {1:[552,24], 2:[625,24], 3:[688,24], 4:[756,24], 5:[824,24]
       ,6:[1094,24], 7:[1161,24], 8:[1228,24], 9:[1293,24], 0:[1360,24]}
for k, v in bind
    HotKey, %k%, Action 
Return

Action:  
    MouseClick, , bind[A_ThisHotkey][1], bind[A_ThisHotkey][2]
    KeyWait, %A_ThisHotKey%, T0.2
    KeyWait, %A_ThisHotKey%, D T1
    If !ErrorLevel
        MouseClick, , 555, 966, 2
Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2014-12-22T13:58:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89674#p89674</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: click при зажатии и перенос курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89673#p89673" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>michael.gg</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>2014-12-22T13:53:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89673#p89673</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: click при зажатии и перенос курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89670#p89670" />
			<content type="html"><![CDATA[<p>Интересует именно первый вариант, в котором если не нажимаешь в течении секунды - то серия сбрасывается (при нажатии перенос и двойной клик, просто Вы упомянули только двойной клик). Был бы очень благодарен, если бы Вы реализовали такой скрипт <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[michael.gg]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32762</uri>
			</author>
			<updated>2014-12-22T12:26:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89670#p89670</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: click при зажатии и перенос курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89669#p89669" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>michael.gg пишет:</cite><blockquote><p>нажимаю N (в течении секунды после первого нажатия) второй раз - нажимает дважды на второй координате, можно ли это вообще реализовать?</p></blockquote></div><br /><p>Твой вариант тоже в принципе возможен, но если ты не уложишься в эту секунду (между первым нажатием на N и вторым нажатием на N), то придется все заново делать, тоесть - прошла секунда и 1 сота секунды и вы нажали на N второй раз то уже 2 клика не выполнится, если я вас правильно понял.Можно сделать так что нажимайте на N (кликает по 1 координате 1 = X:552 Y:24) и держишь, а когда отпускаешь N то кликает 2 раза в конечной координате X:555 Y:966.</p>]]></content>
			<author>
				<name><![CDATA[niceice]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32565</uri>
			</author>
			<updated>2014-12-22T12:17:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89669#p89669</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: click при зажатии и перенос курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89668#p89668" />
			<content type="html"><![CDATA[<div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;длиннокод</div><div class="fancy_spoiler"><div class="codebox"><pre><code>
$1::                                       ;клавиша бинда
    KeyWait, 1             
    KeyWait, 1, D T0.1               
    If ErrorLevel
        send {click, 552, 24}        ; 1 = X:552 Y:24
    Else
    {
        sleep 10                      ;второго нажатия этой же клавиши (в течении секунды после первого)
        send {click, 555, 966, 2}     ; X:555 Y:966 это завершающие координаты
    }
    KeyWait, 1
    Return

$2::
    KeyWait, 2
    KeyWait, 2, D T0.1
    If ErrorLevel
        send {click, 625, 24}
    Else
    {
        sleep 10
        send {click, 555, 966, 2}
    }
    KeyWait, 2
    Return

$3::
    KeyWait, 3
    KeyWait, 3, D T0.1
    If ErrorLevel
        send {click, 688, 24}
    Else
    {
        sleep 10
        send {click, 555, 966, 2}
    }
    KeyWait, 3
    Return

$4::
    KeyWait, 4
    KeyWait, 4, D T0.1
    If ErrorLevel
        send {click, 756, 24}
    Else
    {
        sleep 10
        send {click, 555, 966, 2}
    }
    KeyWait, 4
    Return

$5::
    KeyWait, 5
    KeyWait, 5, D T0.1
    If ErrorLevel
        send {click, 824, 24}
    Else
    {
        sleep 10
        send {click, 555, 966, 2}
    }
    KeyWait, 5
    Return

$6::
    KeyWait, 6
    KeyWait, 6, D T0.1
    If ErrorLevel
        send {click, 1094, 24}
    Else
    {
        sleep 10
        send {click, 555, 966, 2}
    }
    KeyWait, 6
    Return

$7::
    KeyWait, 7
    KeyWait, 7, D T0.1
    If ErrorLevel
        send {click, 1161, 24}
    Else
    {
        sleep 10
        send {click, 555, 966, 2}
    }
    KeyWait, 7
    Return

$8::
    KeyWait, 8
    KeyWait, 8, D T0.1
    If ErrorLevel
        send {click, 1228, 24}
    Else
    {
        sleep 10
        send {click, 555, 966, 2}
    }
    KeyWait, 8
    Return

$9::
    KeyWait, 9
    KeyWait, 9, D T0.1
    If ErrorLevel
        send {click, 1293, 24}
    Else
    {
        sleep 10
        send {click, 555, 966, 2}
    }
    KeyWait, 9
    Return

$0::
    KeyWait, 0
    KeyWait, 0, D T0.1
    If ErrorLevel
        send {click, 1360, 24}
    Else
    {
        sleep 10
        send {click, 555, 966, 2}
    }
    KeyWait, 0
    Return
</code></pre></div></div></div><p>Немного поменял значения и получил практически то, что мне нужно! ... но совсем чуть-чуть не так. Просто в получившемся скрипте перенос и дабл клик происходит после двойного нажатия клавиши, а не после нажатия второй раз (т.е. подразумевалось так: нажимаю N первый раз - кликает на первой координате, нажимаю N (в течении секунды после первого нажатия) второй раз - нажимает дважды на второй координате), можно ли это вообще реализовать? Пока буду пользоваться этим, конечно. Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[michael.gg]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32762</uri>
			</author>
			<updated>2014-12-22T12:00:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89668#p89668</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: click при зажатии и перенос курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89665#p89665" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>michael.gg пишет:</cite><blockquote><p>Но когда пытаюсь запустить, скрипт выдает ошибку</p></blockquote></div><p>Вот без ошибок и простенько но длинно и все как просил.Один раз нажал на 1= клик на X:552 Y:24, 2 раза нажал на 1 = задержка 1 сек. и клик на X:555 Y:966. Ну а дальше думаю сам поймешь.<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;длиннопост</div><div class="fancy_spoiler"><div class="codebox"><pre><code>
$1::                                       ;клавиша бинда
    KeyWait, 1             
    KeyWait, 1, D T0.3               
    If ErrorLevel
        send {click, 552, 24}        ; 1 = X:552 Y:24
    Else
    {
        sleep 1000                      ;второго нажатия этой же клавиши (в течении секунды после первого)
        send {click, 555, 966, 2}     ; X:555 Y:966 это завершающие координаты
    }
    KeyWait, 1
    Return

$2::
    KeyWait, 2
    KeyWait, 2, D T0.3
    If ErrorLevel
        send {click, 625, 24}
    Else
    {
        sleep 1000
        send {click, 555, 966, 2}
    }
    KeyWait, 2
    Return

$3::
    KeyWait, 3
    KeyWait, 3, D T0.3
    If ErrorLevel
        send {click, 688, 24}
    Else
    {
        sleep 1000
        send {click, 555, 966, 2}
    }
    KeyWait, 3
    Return

$4::
    KeyWait, 4
    KeyWait, 4, D T0.3
    If ErrorLevel
        send {click, 756, 24}
    Else
    {
        sleep 1000
        send {click, 555, 966, 2}
    }
    KeyWait, 4
    Return

$5::
    KeyWait, 5
    KeyWait, 5, D T0.3
    If ErrorLevel
        send {click, 824, 24}
    Else
    {
        sleep 1000
        send {click, 555, 966, 2}
    }
    KeyWait, 5
    Return

$6::
    KeyWait, 6
    KeyWait, 6, D T0.3
    If ErrorLevel
        send {click, 1094, 24}
    Else
    {
        sleep 1000
        send {click, 555, 966, 2}
    }
    KeyWait, 6
    Return

$7::
    KeyWait, 7
    KeyWait, 7, D T0.3
    If ErrorLevel
        send {click, 1161, 24}
    Else
    {
        sleep 1000
        send {click, 555, 966, 2}
    }
    KeyWait, 7
    Return

$8::
    KeyWait, 8
    KeyWait, 8, D T0.3
    If ErrorLevel
        send {click, 1228, 24}
    Else
    {
        sleep 1000
        send {click, 555, 966, 2}
    }
    KeyWait, 8
    Return

$9::
    KeyWait, 9
    KeyWait, 9, D T0.3
    If ErrorLevel
        send {click, 1293, 24}
    Else
    {
        sleep 1000
        send {click, 555, 966, 2}
    }
    KeyWait, 9
    Return

$0::
    KeyWait, 0
    KeyWait, 0, D T0.3
    If ErrorLevel
        send {click, 1360, 24}
    Else
    {
        sleep 1000
        send {click, 555, 966, 2}
    }
    KeyWait, 0
    Return
</code></pre></div></div></div>]]></content>
			<author>
				<name><![CDATA[niceice]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32565</uri>
			</author>
			<updated>2014-12-22T11:11:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89665#p89665</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: click при зажатии и перенос курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89663#p89663" />
			<content type="html"><![CDATA[<p>Вот что получилось:<br /></p><div class="codebox"><pre><code>bind := {1:[552,24], 2:[625,24], 3:[688,24], 4:[756,24], 5:[824,24], 6:[1094,24], 7[1161,24], 8[1228,24], 9[1293,24], 0:[1360,24]}
for k, v in bind
    HotKey, %k%, Action 
Return

Action:  
    MouseClick, , bind[A_ThisHotkey][1], bind[A_ThisHotkey][2], bind[A_ThisHotkey][3], bind[A_ThisHotkey][4], bind[A_ThisHotkey][5], bind[A_ThisHotkey][6], bind[A_ThisHotkey][7], bind[A_ThisHotkey][8], bind[A_ThisHotkey][9], bind[A_ThisHotkey][0]
    Sleep 1000
    MouseClick, , 555, 966, 2
    Return</code></pre></div><p>Но когда пытаюсь запустить, скрипт выдает ошибку</p>]]></content>
			<author>
				<name><![CDATA[michael.gg]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32762</uri>
			</author>
			<updated>2014-12-22T09:02:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89663#p89663</id>
		</entry>
</feed>
