<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10346&amp;type=atom" />
	<updated>2015-01-18T16:34:31Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10346</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90692#p90692" />
			<content type="html"><![CDATA[<p>Можно проверять с помощью imagesearch есть ли значок, появляющийся при нажатии средней кнопки мыши, до посылки ctrl+c.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-01-18T16:34:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90692#p90692</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90676#p90676" />
			<content type="html"><![CDATA[<p>Да, с этой задачей скрипт справляется.<br />Если AHK вообще не понимает, что, что-то &quot;выделено&quot;, то думаю просто и эффективно не получится.</p>]]></content>
			<author>
				<name><![CDATA[dredj]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32289</uri>
			</author>
			<updated>2015-01-18T08:06:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90676#p90676</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90675#p90675" />
			<content type="html"><![CDATA[<p>Он работает под эту задачу:<br /></p><div class="quotebox"><blockquote><p>например в браузерах и не только в браузерах, есть плавная прокрутка средней кнопкой мыши, нажатие СКМ включает плавную прокрутку а повторное нажатие выключает, с запущенным скриптом повторное нажатие не выключает плавную прокрутку.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-01-18T07:57:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90675#p90675</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90674#p90674" />
			<content type="html"><![CDATA[<p><strong>Alectric</strong>, последний вариант работает везде, но если средней кнопкой жмакнуть по ссылке в браузере, то открываются сразу две вкладка.<br /><strong>Malcev</strong>, теперь в твоём варианте СКМ нажимается через раз.</p><div class="quotebox"><blockquote><p>Я в ворде тестировал.</p></blockquote></div><p> В ворде не пробовал, но вот например в Directory Opus, SketchUp, в фубаре и ещё по мелочи, там не работает.</p>]]></content>
			<author>
				<name><![CDATA[dredj]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32289</uri>
			</author>
			<updated>2015-01-18T07:48:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90674#p90674</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90672#p90672" />
			<content type="html"><![CDATA[<p>Вот так правильнее будет:<br /></p><div class="codebox"><pre><code>
#InstallKeybdHook
#InstallMouseHook
MButton::
Clipboard =
Send, ^{vk43}
ClipWait, 0.1
if ErrorLevel
{
   var := !var
   if var
      Send, {MButton}
   else if (A_PriorKey != &quot;MButton&quot;)
   {
      Send, {MButton}
      var := !var
   }
}
return</code></pre></div><p>А в окошке с хелпом так:<br /></p><div class="codebox"><pre><code>
#InstallKeybdHook
#InstallMouseHook
MButton::
Clipboard =
Send, ^{vk43}
ClipWait, 0.1
if ErrorLevel
{
   var := !var
   if var
      Send, {MButton}
   else if (A_PriorKey = &quot;LButton&quot;) or (A_PriorKey = &quot;RButton&quot;)
   {
      Send, {MButton 3}
      var := !var
   }
   else if (A_PriorKey != &quot;MButton&quot;)
   {
      Send, {MButton}
      var := !var
   }
}
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-01-18T05:24:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90672#p90672</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90670#p90670" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>У меня твой вариант не работает.</p></blockquote></div><p>Хм... странно, а у меня твой не работает, пробовал в справке ahk.<br />...<br />Сделал &quot;ClipWait, 0&quot; заработало.</p><br /><p>На основе скрипта Malcevа, должно работать с другими приложениями:<br /></p><div class="codebox"><pre><code>~*MButton::
Clipboard =
Send, ^{vk43}
ClipWait, 0
if ErrorLevel
{
   var := !var
   if var
      n = 0
   else if (A_PriorKey != &quot;MButton&quot;)
   {
      n = 0
      var := !var
   }
   else
      n = 1
   Send, {MButton %n%}
}
return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2015-01-18T05:06:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90670#p90670</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90669#p90669" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>но СКМ кроме как в браузере нигде больше не работает.</p></blockquote></div><p>Нигде это где?<br />Я в ворде тестировал.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-01-18T05:03:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90669#p90669</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90667#p90667" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>ЗЫ А разве для кликов мышью не надо значок доллара ставить, чтобы себя посылать?</p></blockquote></div><p>Нет. Мышиные хоткеи всегда с помощью хука реализуются.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2015-01-18T03:40:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90667#p90667</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90666#p90666" />
			<content type="html"><![CDATA[<p>Варианта <strong>Alectric</strong> работает через раз, <strong>Malcev</strong>, твой понадежнее, но СКМ кроме как в браузере нигде больше не работает.</p>]]></content>
			<author>
				<name><![CDATA[dredj]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32289</uri>
			</author>
			<updated>2015-01-18T03:23:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90666#p90666</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90663#p90663" />
			<content type="html"><![CDATA[<p>У меня твой вариант не работает.<br />А так работает:<br /></p><div class="codebox"><pre><code>MButton::
Clipboard =
Send, ^{vk43}
ClipWait, 0.1
if ErrorLevel
{
   var := !var
   if var
      n = 1
   else if (A_PriorKey != &quot;MButton&quot;)
   {
      n = 1
      var := !var
   }
   else
      n = 2
   Send, {MButton %n%}
}
return</code></pre></div><p>Но это все зависит от приложения.<br />Например в фаерфоксе работает скрипт из шестого поста.<br />ЗЫ А разве для кликов мышью не надо значок доллара ставить, чтобы себя посылать?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-01-17T20:06:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90663#p90663</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90643#p90643" />
			<content type="html"><![CDATA[<p>Может так:<br /></p><div class="codebox"><pre><code>setbatchlines,-1

MButton::
  mousegetpos,,,,c
  Clipboard=
  Send,^{vk43}
  ClipWait,0
  if (errorlevel and oldc!=c)
    Send,{MButton}
  else if (oldc=c)
    c=
  else
  {
    tooltip,Скопировано.
    settimer,Removetooltip,-2000
  }
  oldc:=c
Return

RemoveToolTip:
tooltip,
return
</code></pre></div><p>Правда приходится иногда два раза жать.</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2015-01-17T13:04:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90643#p90643</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90641#p90641" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Давно хотел спросить, ведь хоткеи Ctrl-C да и Ctrl-V вызывают в виндовс некие функции API? Если так, то есть ли к ним доступ, чтобы вызвать?</p></blockquote></div><p>Нет, система ничего специально для них не делает, это всё на усмотрение приложения. Просто сложилась традиция использовать их для работы с буфером обмена. Другое дело комбинации Ctrl-Ins, Shift-Ins, Shift-Del. Они вызывают посылку в окно сообщений WM_COPY, WM_PASTE, WM_CUT.</p><p>Но посылка WM_COPY не помогает — не работает в браузере. Возможно, не в тот контрол посылается.<br /></p><div class="quotebox"><blockquote><p>Перед тем как послать Ctrl, можно же проверить что он зажат, и если зажат, то послать только &quot;С&quot;.</p></blockquote></div><p>А почему он должен быть зажат?</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2015-01-17T10:34:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90641#p90641</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90640#p90640" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>посылаемый при втором нажатии Ctrl отключает прокрутку</p></blockquote></div><p>Перед тем как послать Ctrl, можно же проверить что он зажат, и если зажат, то послать только &quot;С&quot;.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-01-17T09:46:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90640#p90640</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90638#p90638" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Как показал несложный эксперимент, посылаемый при втором нажатии Ctrl отключает прокрутку, а затем посыл средней кнопки опять её включает.</p></blockquote></div><p>Вот-вот, сам то я это понял, только не знал как объяснить.<br /></p><div class="quotebox"><blockquote><p>Но откуда же ему знать?</p></blockquote></div><p>Ну сперва думал может есть какая-то контекстно-чувствительная команда ждущее событие типа &quot;что то выделено&quot;, на подобие IfWinActive/WinWaitActive</p>]]></content>
			<author>
				<name><![CDATA[dredj]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32289</uri>
			</author>
			<updated>2015-01-17T09:38:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90638#p90638</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Копирования выделенного текста с помощью СКМ(MButton)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90637#p90637" />
			<content type="html"><![CDATA[<p>Давно хотел спросить, ведь хоткеи Ctrl-C да и Ctrl-V вызывают в виндовс некие функции API? Если так, то есть ли к ним доступ, чтобы вызвать?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-01-17T09:06:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90637#p90637</id>
		</entry>
</feed>
