<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=13626</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13626&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?».]]></description>
		<lastBuildDate>Mon, 16 Apr 2018 13:32:55 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124763#p124763</link>
			<description><![CDATA[<p><strong>teadrinker</strong><br />Всё работает. Огромное вам спасибо :-)</p>]]></description>
			<author><![CDATA[null@example.com (MirchikAhtung)]]></author>
			<pubDate>Mon, 16 Apr 2018 13:32:55 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124763#p124763</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124749#p124749</link>
			<description><![CDATA[<p>А, понял, в чём проблема. В функцию нужно передать имя окна, т. к. внутри функции переменная gui_name не видна:<br /></p><div class="codebox"><pre><code>values := [ {input: &quot;gg ss&quot;, function: Func(&quot;FirstFunc&quot; ), delay: 3000}
          , {input: &quot;gg s&quot; , function: Func(&quot;SecondFunc&quot;), delay: 3000}
          , {input: &quot;ss g&quot; , function: Func(&quot;ThirdFunc&quot; ), delay: 3000} ] 

gui_name := &quot;Main&quot;
Gui, %gui_name%:Add, Edit, vEdit gWatchEdit w150, Текст
Gui, %gui_name%:Show
Return

WatchEdit()  {
   global values
   GuiControlGet, Edit
   for k, v in values
      if RegExMatch(Edit, &quot;^\Q&quot; . v.input . &quot;\E$&quot;) &amp;&amp; i := k
         break
      
   if i  {
      obj := values[i]
      if !obj.delay
         obj.function.Call(A_Gui)
      else  {
         timer := obj.function.Bind(A_Gui)  ; передаём имя окна, оно здесь в переменной A_Gui
         SetTimer, % timer, % &quot;-&quot; . obj.delay
      }
   }
}

FirstFunc(GuiName)  {
   ExitApp
}

SecondFunc(GuiName)  {
   MsgBox, &quot;gg s&quot;
   GuiControl, %GuiName%:, Edit
}

ThirdFunc(GuiName)  {
   MsgBox, &quot;ss g&quot;
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Mon, 16 Apr 2018 09:57:54 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124749#p124749</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124747#p124747</link>
			<description><![CDATA[<p><strong>teadrinker</strong><br />Похоже я не так объяснил, т.е запутав, из-за чего вы меня немного не так поняли.<br />Оно стирает, стирает ТЕКСТ при запуске скрипта, но нужно, чтобы стирало и текст что мы ввели, те gg s - выскочил msgbox - стёрлась строка и.т.д.<br /></p><div class="codebox"><pre><code>show := 1 

values := [ {input: &quot;gg ss&quot;, function: Func(&quot;FirstFunc&quot; ), delay: 300}
          , {input: &quot;gg s&quot; , function: Func(&quot;SecondFunc&quot;), delay: 300}
          , {input: &quot;ss g&quot; , function: Func(&quot;ThirdFunc&quot; ), delay: 300} ] 
gui_name := &quot;Main&quot; 
Gui, %gui_name%: +AlwaysOnTop 
Gui, %gui_name%:Add, Edit, vEdit gWatchEdit w150, ТЕКСТ
Gui, %gui_name%:Show
Sleep 1000
GuiControl, %gui_name%:, Edit 
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (MirchikAhtung)]]></author>
			<pubDate>Mon, 16 Apr 2018 04:30:34 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124747#p124747</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124743#p124743</link>
			<description><![CDATA[<div class="codebox"><pre><code>gui_name := &quot;Main&quot; 
Gui, %gui_name%: +AlwaysOnTop 
Gui, %gui_name%:Add, Edit, vEdit w150, Текст
Gui, %gui_name%:Show
Sleep 1000
GuiControl, %gui_name%:, Edit </code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sun, 15 Apr 2018 21:44:17 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124743#p124743</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124742#p124742</link>
			<description><![CDATA[<p><strong>teadrinker</strong><br />Я маленько запутался.<br />Я ранее пробовал - не работало.<br />Сейчас - не работает.<br />И так<br /></p><div class="codebox"><pre><code>GuiControl, %gui_name%:Show, Edit</code></pre></div><p>и вот так<br /></p><div class="codebox"><pre><code>GuiControl, %gui_name%:, Edit</code></pre></div><p>Не вижу очевидного, либо чего-то ещё не хватает?</p>]]></description>
			<author><![CDATA[null@example.com (MirchikAhtung)]]></author>
			<pubDate>Sun, 15 Apr 2018 21:29:12 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124742#p124742</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124741#p124741</link>
			<description><![CDATA[<div class="codebox"><pre><code>GuiControl, %gui_name%:, Edit</code></pre></div><p><a href="https://autohotkey.com/docs/commands/GuiControl.htm#Remarks">Ссылка</a> на пример в хэлпе.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sun, 15 Apr 2018 21:03:19 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124741#p124741</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124740#p124740</link>
			<description><![CDATA[<p><strong>teadrinker</strong><br />Про шерстил с конца до середины <a href="https://autohotkey.com/docs/commands/GuiControl.htm">https://autohotkey.com/docs/commands/GuiControl.htm</a><br />Я себе пару нервных клеток убил, но результата не дало.<br />Напишите прямой ответ! Захочу - не найду.</p>]]></description>
			<author><![CDATA[null@example.com (MirchikAhtung)]]></author>
			<pubDate>Sun, 15 Apr 2018 20:59:02 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124740#p124740</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124739#p124739</link>
			<description><![CDATA[<div class="quotebox"><cite>MirchikAhtung пишет:</cite><blockquote><div class="codebox"><pre><code>GuiControl,, %gui_name%:Edit</code></pre></div></blockquote></div><p>%gui_name% не в том месте. Читайте хелп внимательнее.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sun, 15 Apr 2018 20:08:36 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124739#p124739</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124738#p124738</link>
			<description><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>У меня зачищает.</p><div class="codebox"><pre><code>Gui, Add, Edit, vEdit w150, Текст
Gui, Show
Sleep, 1000
GuiControl,, Edit</code></pre></div></blockquote></div><p>Вот моё начало, я не понимаю что тут всё портит..<br /></p><div class="codebox"><pre><code>show := 1 

values := [ {input: &quot;gg ss&quot;, function: Func(&quot;FirstFunc&quot; ), delay: 300}
          , {input: &quot;gg s&quot; , function: Func(&quot;SecondFunc&quot;), delay: 300}
          , {input: &quot;ss g&quot; , function: Func(&quot;ThirdFunc&quot; ), delay: 300} ] 
gui_name := &quot;Main&quot; 
Gui, %gui_name%: +AlwaysOnTop 
Gui, %gui_name%:Add, Edit, vEdit gWatchEdit w150, Текст
Gui, %gui_name%:Show
GuiControl,, %gui_name%:Edit
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (MirchikAhtung)]]></author>
			<pubDate>Sun, 15 Apr 2018 20:04:26 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124738#p124738</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124737#p124737</link>
			<description><![CDATA[<p>У меня зачищает.</p><div class="codebox"><pre><code>Gui, Add, Edit, vEdit w150, Текст
Gui, Show
Sleep, 1000
GuiControl,, Edit</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sun, 15 Apr 2018 19:55:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124737#p124737</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124735#p124735</link>
			<description><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Ассоциированная переменная не vEdit, а просто Edit. v — это название опции.</p></blockquote></div><div class="codebox"><pre><code>GuiControl,, Edit </code></pre></div><p> <br />Не зачищает строку для ввода.<br />Использую последний код, что ты мне скинул.</p>]]></description>
			<author><![CDATA[null@example.com (MirchikAhtung)]]></author>
			<pubDate>Sun, 15 Apr 2018 19:20:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124735#p124735</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124734#p124734</link>
			<description><![CDATA[<div class="quotebox"><cite>MirchikAhtung пишет:</cite><blockquote><div class="codebox"><pre><code>GuiControl,, vEdit</code></pre></div></blockquote></div><p>Ассоциированная переменная не vEdit, а просто Edit. v — это название опции.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sun, 15 Apr 2018 19:00:55 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124734#p124734</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124733#p124733</link>
			<description><![CDATA[<p><strong>teadrinker</strong><br />Вдвойне рукалицо.<br />GuiControl, vEdit в функции после msgbox не затирает поле для ввода, мои знания в AHK очень скудны, и помимо этого ничего не лезет в голову..</p><div class="codebox"><pre><code>
SecondFunc()  {
   MsgBox, &quot;gg s&quot;
GuiControl,, vEdit
}
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (MirchikAhtung)]]></author>
			<pubDate>Sun, 15 Apr 2018 18:45:35 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124733#p124733</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124728#p124728</link>
			<description><![CDATA[<p><strong>MirchikAhtung</strong>, рукалицо.jpeg<br /></p><div class="codebox"><pre><code>values := [ {input: &quot;gg ss&quot;, function: Func(&quot;FirstFunc&quot; ), delay: 3000}
          , {input: &quot;gg s&quot; , function: Func(&quot;SecondFunc&quot;), delay: 3000}
          , {input: &quot;ss g&quot; , function: Func(&quot;ThirdFunc&quot; ), delay: 3000} ] 

Gui, Add, Edit, vEdit gWatchEdit
Gui, Show
Return

WatchEdit()  {
   global values
   GuiControlGet, Edit
   for k, v in values
      if RegExMatch(Edit, &quot;^\Q&quot; . v.input . &quot;\E$&quot;) &amp;&amp; i := k
         break
      
   if i  {
      obj := values[i]
      if !obj.delay
         obj.function.Call()
      else  {
         timer := obj.function
         SetTimer, % timer, % &quot;-&quot; . obj.delay
      }
   }
}

FirstFunc()  {
   ExitApp
}

SecondFunc()  {
   MsgBox, &quot;gg s&quot;
}

ThirdFunc()  {
   MsgBox, &quot;ss g&quot;
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sun, 15 Apr 2018 14:18:07 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124728#p124728</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как запретить ввод ПРОБЕЛА в поле для ввода?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124727#p124727</link>
			<description><![CDATA[<p><strong>teadrinker</strong> Это я попробывал поставить таймер на все 3 функции :-(</p>]]></description>
			<author><![CDATA[null@example.com (MirchikAhtung)]]></author>
			<pubDate>Sun, 15 Apr 2018 14:03:07 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124727#p124727</guid>
		</item>
	</channel>
</rss>
