<?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=8705&amp;type=atom" />
	<updated>2013-09-28T19:10:50Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8705</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Блокировать кнопку при появлении картинки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75612#p75612" />
			<content type="html"><![CDATA[<p>Не, так не работает вообще.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2013-09-28T19:10:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75612#p75612</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Блокировать кнопку при появлении картинки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75607#p75607" />
			<content type="html"><![CDATA[<p>Может так:<br /></p><div class="codebox"><pre><code>Lshift::
Sendplay,{lshift up}
Keywait,lshift
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2013-09-28T16:21:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75607#p75607</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Блокировать кнопку при появлении картинки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75598#p75598" />
			<content type="html"><![CDATA[<p>На первой строчке надо #Persistent написать?<br />Все-равно мигает.<br />Я зажимаю Shift при запущенном коде и курсор мигает так как-будто, то я нажимаю на шифт, то отпускаю.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2013-09-27T19:58:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75598#p75598</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Блокировать кнопку при появлении картинки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75589#p75589" />
			<content type="html"><![CDATA[<p>При таком запущенном коде, блокируется как надо?<br /></p><div class="codebox"><pre><code>
   OnExit, Exit
   hHookKeybd := DllCall(&quot;SetWindowsHookEx&quot; . (A_IsUnicode ? &quot;W&quot; : &quot;A&quot;)
      , Int, WH_KEYBOARD_LL := 13
      , Ptr, RegisterCallback(&quot;LowLevelKeyboardProc&quot;, &quot;Fast&quot;)
      , Ptr, DllCall(&quot;GetModuleHandle&quot;, UInt, 0, Ptr)
      , UInt, 0, Ptr)
   Return

Exit:
   DllCall(&quot;UnhookWindowsHookEx&quot;, Ptr, hHookKeybd)
   ExitApp

LowLevelKeyboardProc(nCode, wParam, lParam)
{
   Critical
   If NumGet(lParam+0, 0, &quot;UInt&quot;) = 160 ; 160 dec vk code LShift
        Return 1
   Return DllCall(&quot;CallNextHookEx&quot;, Ptr, 0, Int, nCode, UInt, wParam, UInt, lParam)
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-27T14:02:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75589#p75589</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Блокировать кнопку при появлении картинки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75588#p75588" />
			<content type="html"><![CDATA[<p>Так что именно мигает. Когда нажимаешь на LShift должно мигать, в смысле без блокировок, и в какой то программе?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-27T13:46:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75588#p75588</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Блокировать кнопку при появлении картинки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75587#p75587" />
			<content type="html"><![CDATA[<p>Да.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2013-09-27T13:30:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75587#p75587</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Блокировать кнопку при появлении картинки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75586#p75586" />
			<content type="html"><![CDATA[<p>Так тоже мигает?<br /></p><div class="codebox"><pre><code>LShift:: return </code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-27T13:29:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75586#p75586</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Блокировать кнопку при появлении картинки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75585#p75585" />
			<content type="html"><![CDATA[<p>Мигает так же. Наверное перехват у программы идет быстрее.<br />При том вариант Irbis работает хуже, чем мой или serzh82saratov.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2013-09-27T13:27:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75585#p75585</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Блокировать кнопку при появлении картинки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75584#p75584" />
			<content type="html"><![CDATA[<p><strong>Irbis</strong><br />Действительно так лучше, зачем проверять в цикле когда надо только при нажатии.<br />А что имелось ввиду под <strong>&amp;</strong>.<br /></p><div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>The following variable name contains illegal character &quot;&amp;x&quot;</p></blockquote></div><p>Попробуй так:<br /></p><div class="codebox"><pre><code>
#if pict(x, y)
LShift:: return 
#if 
return

pict(ByRef x, ByRef y)
{ 
    ImageSearch, x, y, 0, 0, A_ScreenWidth, A_ScreenHeight, D:\strelka.png
    return !ErrorLevel
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-27T13:02:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75584#p75584</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Блокировать кнопку при появлении картинки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75583#p75583" />
			<content type="html"><![CDATA[<p>Error at line 6.<br />The following variable name contains illegal character &quot;&amp;x&quot;</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2013-09-27T12:55:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75583#p75583</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Блокировать кнопку при появлении картинки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75578#p75578" />
			<content type="html"><![CDATA[<p>Зачем изобретать велосипед? <br /></p><div class="codebox"><pre><code>#if pict(&amp;x,  &amp;y)
LShift:: return 
#if 
return

pict(&amp;x,  &amp;y)
{ 
ImageSearch, x, y, 0, 0,
A_ScreenWidth,
A_ScreenHeight, D:\strelka.png
  return  !ErrorLevel
}
         </code></pre></div><p>это в случае, если нужно сохранить найденные координаты. Если нет, то параметры в функцию можно не передавать.</p>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2013-09-27T06:08:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75578#p75578</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Блокировать кнопку при появлении картинки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75575#p75575" />
			<content type="html"><![CDATA[<p>Так же помигивает.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2013-09-26T23:50:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75575#p75575</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Блокировать кнопку при появлении картинки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75574#p75574" />
			<content type="html"><![CDATA[<p>Так попробуй:<br /></p><div class="codebox"><pre><code>
loop
{
   ImageSearch, x, y, 0, 0, A_ScreenWidth, A_ScreenHeight, D:\strelka.png
   Hotkey, LShift, Block, % !ErrorLevel ? &quot;On&quot; : &quot;Off&quot;
   Sleep, 50
}  

Block: 
    return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-09-26T23:40:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75574#p75574</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Блокировать кнопку при появлении картинки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75573#p75573" />
			<content type="html"><![CDATA[<p>Написал следующий код - при появлении картинки, который при появлении картинки блокирует зажатие шифта.<br />Но работает как-то не так при зажатии шифта - курсор мелькает, как-будто шифт-таки нажимается.<br />Что тут не так?<br /></p><div class="codebox"><pre><code>loop
{
   ImageSearch, x, y, 0, 0, A_ScreenWidth, A_ScreenHeight, D:\strelka.png
   if !ErrorLevel
   {
      while GetKeyState(&quot;LShift&quot;)
         LShift:: return
   }
   Sleep, 50
}   </code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2013-09-26T23:30:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75573#p75573</id>
		</entry>
</feed>
