<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=11043</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11043&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Запретить закрывание msgbox с клавиатуры в момент его появления».]]></description>
		<lastBuildDate>Fri, 30 Oct 2015 14:46:35 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98555#p98555</link>
			<description><![CDATA[<p>Кроме того, по хорошему в условии ещё нужно проверять, твой ли это MsgBox.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Fri, 30 Oct 2015 14:46:35 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98555#p98555</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98554#p98554</link>
			<description><![CDATA[<p>Так можно закрыть через Ctrl + Enter или Ctrl + Space. Лучше тогда</p><div class="codebox"><pre><code>sleep 1000
MsgBox, 262148, test
return

#IfWinActive, test ahk_class #32770
*space::
*enter::
return
#IfWinActive</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Fri, 30 Oct 2015 14:43:27 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98554#p98554</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98553#p98553</link>
			<description><![CDATA[<p>Привык к дизайну msgbox.<br /></p><div class="quotebox"><blockquote><p>Пропускать клавиатуру через хук, отслеживая активность MsgBox.</p></blockquote></div><p>Вроде можно без хука:<br /></p><div class="codebox"><pre><code>sleep 1000
MsgBox, 262148, test
return

#IfWinActive, test ahk_class #32770
space::
enter::
return
#IfWinActive</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 30 Oct 2015 14:37:35 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98553#p98553</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98551#p98551</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>Задача: при появлении msgbox запретить закрывание его с клавиатуры.</p></blockquote></div><p>Почему нельзя использовать своё окно GUI? Как раз с ним всё проще.</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Fri, 30 Oct 2015 13:55:58 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98551#p98551</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98549#p98549</link>
			<description><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>Задача: при появлении msgbox запретить закрывание его с клавиатуры.</p></blockquote></div><p> Пропускать клавиатуру через хук, отслеживая активность MsgBox.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Fri, 30 Oct 2015 12:32:27 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98549#p98549</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98539#p98539</link>
			<description><![CDATA[<p>Если быстро нажимать - не пропускает, если зажать и держать - тогда пропускает, думаю это неизбежно и поможет только свое гуи.</p><p>...</p><p>Набросал функцию:<br /></p><div class="codebox"><pre><code>sleep,1000
tooltip,start
msg:=msgbox(&quot;test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test &quot;)
tooltip,done msg = %msg%
sleep,1000


msgbox(text=&quot;&quot;)
{
  gui,99:-sysmenu
  gui,99:add,button,x0 y0 w1 h1,Dummy
  gui,99:add,text,xm ym w300,% text
  gui,99:add,button,xm+130 y+10 w70 h20 g99Ok,Ok
  gui,99:add,button,x+10 yp w70 h20 g99Cencel,Cencel
  gui,99:show

  loop
    sleep,100
    until msg
  gui,99:destroy

  return msg
;  if msg=1
;    return &quot;Ok&quot;
;  else if msg=2
;    return &quot;Cencel&quot;

  99Ok:
  msg=1
  return

  99Cencel:
  msg=2
  return
}


</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Fri, 30 Oct 2015 09:08:12 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98539#p98539</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98533#p98533</link>
			<description><![CDATA[<p>Хотя, все-равно пропускает.<br />Попробуйте запустить скрипт и быстро нажимать на space.<br /></p><div class="codebox"><pre><code>sleep,1000
SetTimer, DisableMsg, 10
MsgBox, 262148, test,test
return

DisableMsg:
WinActivate, ahk_class Shell_TrayWnd
SetTimer, DisableMsg, Off
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 30 Oct 2015 08:53:39 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98533#p98533</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98530#p98530</link>
			<description><![CDATA[<p>Неужели бывают такие задержки в работе скрипта? Хотя впринципе если и будут, то само появление msgbox задержится.</p><br /><p>Тогда так для надежности:<br /></p><div class="codebox"><pre><code>
SetTimer, DisableMsg, 10
sleep,1000
MsgBox, 262148, test,% c
return

DisableMsg:
c++
WinActivate, ahk_class Shell_TrayWnd
if c&gt;10
{
  SetTimer, DisableMsg, Off
  c=
}
Return


</code></pre></div><br /><br /><p>#6 при загрузке в 100% на одноядерном компе работает корректно. А комп ужасный тормоз, поверьте мне...</p>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Fri, 30 Oct 2015 08:41:01 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98530#p98530</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98525#p98525</link>
			<description><![CDATA[<p>Не подходит:<br /></p><div class="codebox"><pre><code>SetTimer, DisableMsg, 10
sleep 1000
MsgBox, 262148, test,test
return

DisableMsg:
WinActivate, ahk_class Shell_TrayWnd
SetTimer, DisableMsg, Off
Return
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 30 Oct 2015 08:24:15 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98525#p98525</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98524#p98524</link>
			<description><![CDATA[<div class="codebox"><pre><code>SetTimer, DisableMsg, 10
MsgBox, 262148, test,test
return

DisableMsg:
WinActivate, ahk_class Shell_TrayWnd
SetTimer, DisableMsg, Off
Return
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Fri, 30 Oct 2015 08:20:20 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98524#p98524</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98523#p98523</link>
			<description><![CDATA[<p>Не, блокировать клавиатуру нельзя, так как пока скрипт работает на компьютере тоже работают.<br />Все это нужно для того, чтобы случайно не закрыть этот msgbox при появлении.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 30 Oct 2015 08:15:07 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98523#p98523</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98521#p98521</link>
			<description><![CDATA[<p>А так?<br /></p><div class="codebox"><pre><code>BlockInput On
SetTimer, DisableMsg, -30
MsgBox, 262148, test
Return

DisableMsg:
   WinWait, test ahk_class #32770
   WinActivate, ahk_class Shell_TrayWnd
   BlockInput Off
Return </code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Irbis)]]></author>
			<pubDate>Fri, 30 Oct 2015 08:09:32 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98521#p98521</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98520#p98520</link>
			<description><![CDATA[<p>Подойдет, но не хотелось бы усложнять.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 30 Oct 2015 08:03:31 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98520#p98520</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98519#p98519</link>
			<description><![CDATA[<p>Вариант с собственным гуи не подойдет? Думаю, можно даже функцию сделать...<br />Например сделать нерабочий элемент (dummy), который будет поумолчанию нажиматься с клавиатуры.</p>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Fri, 30 Oct 2015 07:47:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98519#p98519</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Запретить закрывание msgbox с клавиатуры в момент его появления]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=98516#p98516</link>
			<description><![CDATA[<p>Задача: при появлении msgbox запретить закрывание его с клавиатуры.<br />Такой код срабатывает не всегда (можно успеть нажать space и закрыть.)<br /></p><div class="codebox"><pre><code>SetTimer, DisableMsg, 10
MsgBox, 262148, test
return

DisableMsg:
WinWait, test ahk_class #32770
WinActivate, ahk_class Shell_TrayWnd
SetTimer, DisableMsg, Off
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 30 Oct 2015 07:12:59 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=98516#p98516</guid>
		</item>
	</channel>
</rss>
