<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Исключить работу скрипта в Firefox]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=9145&amp;type=atom" />
	<updated>2014-01-13T19:31:48Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=9145</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Исключить работу скрипта в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79184#p79184" />
			<content type="html"><![CDATA[<p><strong>Irbis</strong><br />Что-то у меня и так и так не хочет нормально этот скрипт работать, видать с чем то конфликтует. Придется по старинке копировать, вставлять, через контекстное. Спасибо что откликнулись.</p>]]></content>
			<author>
				<name><![CDATA[villla777]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29535</uri>
			</author>
			<updated>2014-01-13T19:31:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79184#p79184</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Исключить работу скрипта в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79177#p79177" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>mousedrag_treshold := 20 ; pixels
middleclick_available := 15 ; seconds

Hotkey mbutton, paste_selection
Hotkey mbutton, off
Hotkey rbutton, cancel_paste
Hotkey rbutton, off
    
    
#If !(WinActive(&quot;ahk_class ConsoleWindowClass&quot;) || WinActive(&quot;ahk_class MozillaWindowClass&quot;))
~lButton::
  MouseGetPos, mousedrag_x, mousedrag_y
  keywait lbutton
  mousegetpos, mousedrag_x2, mousedrag_y2
  if (abs(mousedrag_x2 - mousedrag_x) &gt; mousedrag_treshold
    or abs(mousedrag_y2 - mousedrag_y) &gt; mousedrag_treshold)
  {
    wingetclass class, A
    if (class == &quot;Emacs&quot;)
      sendinput !w
    else
      sendinput ^c
    settimer follow_mouse, 100
    settimer cleanup, % middleclick_available * 1000
    hotkey mbutton, on
    hotkey rbutton, on
  }
  return
  
;; clipx
^mbutton::
  sendinput ^+{insert}
  return
#If
  
  
follow_mouse:
  tooltip copy
  return
  
paste_selection:
  sendinput {lbutton}
  WinGetClass class, A
  if (class == &quot;Emacs&quot;)
    SendInput ^y
  else
    SendInput ^v
  gosub cleanup
  return
  
cancel_paste:
  sendinput {rbutton}
  gosub cleanup
  return  
  
cleanup:
  Hotkey mbutton, off
  Hotkey rbutton, off
  SetTimer cleanup, off
  settimer follow_mouse, off
  tooltip
  Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2014-01-13T18:36:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79177#p79177</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Исключить работу скрипта в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79153#p79153" />
			<content type="html"><![CDATA[<p>Собственно есть такой скрипт, копирует, вставляет выделенный текст, нужно чтобы в окне Firefox он не работал.<br /></p><div class="codebox"><pre><code>mousedrag_treshold := 20 ; pixels
middleclick_available := 15 ; seconds

Hotkey mbutton, paste_selection
Hotkey mbutton, off
Hotkey rbutton, cancel_paste
Hotkey rbutton, off
    
    
#IfWinNotActive ahk_class ConsoleWindowClass

~lButton::
  MouseGetPos, mousedrag_x, mousedrag_y
  keywait lbutton
  mousegetpos, mousedrag_x2, mousedrag_y2
  if (abs(mousedrag_x2 - mousedrag_x) &gt; mousedrag_treshold
    or abs(mousedrag_y2 - mousedrag_y) &gt; mousedrag_treshold)
  {
    wingetclass class, A
    if (class == &quot;Emacs&quot;)
      sendinput !w
    else
      sendinput ^c
    settimer follow_mouse, 100
    settimer cleanup, % middleclick_available * 1000
    hotkey mbutton, on
    hotkey rbutton, on
  }
  return
#IfWinNotActive
  
  
follow_mouse:
  tooltip copy
  return
  
paste_selection:
  sendinput {lbutton}
  WinGetClass class, A
  if (class == &quot;Emacs&quot;)
    SendInput ^y
  else
    SendInput ^v
  gosub cleanup
  return
  
cancel_paste:
  sendinput {rbutton}
  gosub cleanup
  return  
  
cleanup:
  Hotkey mbutton, off
  Hotkey rbutton, off
  SetTimer cleanup, off
  settimer follow_mouse, off
  tooltip
  Return
  
  
;; clipx
^mbutton::
  sendinput ^+{insert}
  return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[villla777]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29535</uri>
			</author>
			<updated>2014-01-13T13:16:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79153#p79153</id>
		</entry>
</feed>
