<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Поле ввода на GUI]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=17441&amp;type=atom" />
	<updated>2022-10-29T11:46:15Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=17441</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поле ввода на GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155474#p155474" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Замечательно, это именно то, что я хотел, щас осталось сделать по нажатию Enter чтобы она принимало в переменную это число и на экране пропадала надпись. Спасибо большое за помощь, извините если возможно плохо объяснил что именно нужно было.</p>]]></content>
			<author>
				<name><![CDATA[jbn238]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42492</uri>
			</author>
			<updated>2022-10-29T11:46:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155474#p155474</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поле ввода на GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155467#p155467" />
			<content type="html"><![CDATA[<p>Хотя скорее всего. Иначе наверняка и обычный Edit устроил бы.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2022-10-29T10:54:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155467#p155467</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поле ввода на GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155464#p155464" />
			<content type="html"><![CDATA[<p>Или про такое:<br /></p><div class="codebox"><pre><code>#UseHook
X_Text := 500
Y_Text := 300
fontName := &quot;Calibri&quot;
fontSize := 64
fontColor := 0x4682B4

Gui, Text: New, +LastFound +Owner -Caption +AlwaysOnTop +E0x20
Gui, Margin, 0, 0
Gui, Font, s%fontSize% q4 c%fontColor%, %fontName%
Gui, Color, FFFFFF
WinSet, Transcolor, FFFFFF
Gui, Add, Text
Return

F1::
   if (t := !t) {
      Hook := InputHook()
      Hook.KeyOpt(&quot;{All}&quot;, &quot;N&quot;)
      Hook.OnKeyDown := Func(&quot;OnKeyDown&quot;).Bind(X_Text, Y_Text, fontSize, fontName)
      Hook.Start()
   }
   else {
      Gui, Text:Show, Hide
      Hook.Stop()
   }
   Return

Esc:: ExitApp

OnKeyDown(X_Text, Y_Text, fontSize, fontName, Hook, vk, sc) {
   text := Hook.Input
   if (text = &quot;&quot;) {
      Gui, Text:Show, Hide
      Return
   }
   Gui, New
   Gui, Font, s%fontSize% q4, %fontName%
   Gui, Add, Text,, % text
   GuiControlGet, Pos, Pos, Static1
   Gui, Destroy
   
   Gui, Text: Default
   GuiControl, Move, Static1, w%PosW% h%PosH%
   GuiControl,, Static1, % text
   Gui, Show, NA x%X_Text% y%Y_Text% w%PosW% h%PosH%
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-10-29T10:46:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155464#p155464</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поле ввода на GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155463#p155463" />
			<content type="html"><![CDATA[<p>Тут нет поля ввода.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2022-10-29T10:46:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155463#p155463</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поле ввода на GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155462#p155462" />
			<content type="html"><![CDATA[<p>Я думаю что речь про такое.<br /></p><div class="codebox"><pre><code>
#NoEnv
#SingleInstance Force  

Gui, +AlwaysOnTop -Caption
Gui, Margin, 0, 0
Gui, Font, s66  
Gui, Font, cE5F3FF 
Gui, Color, 389AE8
Gui, Add, Text, Center Border gText1 vText1 w262, PIN
Gui, Add, Edit, vKey1 Center Hidden Limit4 Number gKey1 xp yp wp hp   
Gui, Show
Return

Esc::ExitApp 
 
Text1() {
	GuiControl, Focus, Key1
}
	
Key1() {    
	GuiControlGet, Key1 
	GuiControl, , Text1, % Key1
} 
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2022-10-29T10:44:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155462#p155462</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поле ввода на GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155459#p155459" />
			<content type="html"><![CDATA[<p>Я думал без поля ввода вообще.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-10-29T10:39:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155459#p155459</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поле ввода на GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155456#p155456" />
			<content type="html"><![CDATA[<p>Кстати &quot;цифровое&quot; пропустил.<br /></p><div class="codebox"><pre><code>
#NoEnv
#SingleInstance Force  
 
Gui, Font, s16  
Gui, Add, Text, Center Border gText1 vText1 w222,кликни меня
Gui, Add, Edit, vKey1 Hidden Number gKey1 xp yp wp hp  
Gui, Add, Edit, Center wp    
Gui, Show
Return

Esc::ExitApp 
 
Text1() {
	GuiControl, Focus, Key1
}
	
Key1() {    
	GuiControlGet, Key1 
	GuiControl, , Text1, % Key1
} 
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2022-10-29T10:38:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155456#p155456</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поле ввода на GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155455#p155455" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Так он и будет выводится в виде Gui, Add, Text. <br />Тебя не смущает в тз - &quot;своё цифровое поле ввода&quot;.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2022-10-29T10:35:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155455#p155455</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поле ввода на GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155454#p155454" />
			<content type="html"><![CDATA[<p>Я так понял, что нужно, чтобы текст выводился прямо на экран. Тогда действительно InputHook.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-10-29T10:31:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155454#p155454</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поле ввода на GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155451#p155451" />
			<content type="html"><![CDATA[<p>Самое простое решение.<br /></p><div class="codebox"><pre><code>
#NoEnv
#SingleInstance Force  
 
Gui, Font, s16  
Gui, Add, Text, Center Border gText1 vText1 w222,кликни меня
Gui, Add, Edit, Center wp    
Gui, Add, Edit, vKey1 Hidden gKey1 w0 h0  
Gui, Show
Return

Esc::ExitApp 
 
Text1() {
	GuiControl, Focus, Key1
}
	
Key1() {    
	GuiControlGet, Key1 
	GuiControl, , Text1, % Key1
} 
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2022-10-29T10:25:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155451#p155451</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поле ввода на GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155445#p155445" />
			<content type="html"><![CDATA[<p>Возможно вам поможет <a href="https://www.autohotkey.com/docs/commands/InputHook.htm">InputHook</a>?</p>]]></content>
			<author>
				<name><![CDATA[Phoenixxx_Czar]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34426</uri>
			</author>
			<updated>2022-10-29T08:14:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155445#p155445</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поле ввода на GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155442#p155442" />
			<content type="html"><![CDATA[<p><strong>jbn238</strong><br />Это все равно особо не говорит о том, где вы хотите это вводить, то есть, когда учитывать ваши нажатия, а когда нет. <br />Если ввод осуществляется внутри Gui вашего окна, тогда то, что я вам выше посоветовал, а если это происходит только в некоторых моментах, то тут немного посложнее будет.<br />Однако я все равно не вижу смысла от этого, если второй вариант.<br />Визуально бы показали, либо подождите других, может они вас поймут и ответят.</p>]]></content>
			<author>
				<name><![CDATA[Clannad5]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39853</uri>
			</author>
			<updated>2022-10-29T02:04:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155442#p155442</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поле ввода на GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155441#p155441" />
			<content type="html"><![CDATA[<p><strong>Clannad5</strong><br />Хочу реализовать ввод пин-кода, чтобы на экране показывало какие именно цифры нажимаю, если допустил ошибку, чтобы была возможность стирать, и все это так же отображалось на экране. А именно на GUI, чтобы красиво оформить.</p>]]></content>
			<author>
				<name><![CDATA[jbn238]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42492</uri>
			</author>
			<updated>2022-10-29T01:12:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155441#p155441</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поле ввода на GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155438#p155438" />
			<content type="html"><![CDATA[<p><strong>jbn238</strong><br />Не особо понял что вы хотите.<br />Вы хотите конкретно использовать Gui, как вывод текста при нажатий? Обычного ToolTip не подойдёт?<br />Если Gui, то используйте Gui + Горячие клавиши, в чём проблема?При нажатий по горячим клавишам, выводите информацию в Gui.</p>]]></content>
			<author>
				<name><![CDATA[Clannad5]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39853</uri>
			</author>
			<updated>2022-10-28T21:22:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155438#p155438</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Поле ввода на GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155428#p155428" />
			<content type="html"><![CDATA[<p>Доброго времени, хочу сделать своё цифровое поле ввода, с помощью GUI. Например: при нажатие на кнопку 1 (неважно Num или обычную), на экране выводилось 1, после при нажатие 2, на экране уже было &quot;12&quot;, при нажатие на Backspace чтобы символ стирался. Подскажите, пожалуйста, как можно такое реализовать?</p><p>p.s. стандартные InputBox и Gui,Edit не подходят.</p>]]></content>
			<author>
				<name><![CDATA[jbn238]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42492</uri>
			</author>
			<updated>2022-10-28T15:31:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155428#p155428</id>
		</entry>
</feed>
