<?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=16314&amp;type=atom" />
	<updated>2021-05-05T19:17:32Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16314</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изображение поверх окна и взаимодействие с ним.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147665#p147665" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, большое спасибо.</p>]]></content>
			<author>
				<name><![CDATA[Morux2112]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41251</uri>
			</author>
			<updated>2021-05-05T19:17:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147665#p147665</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изображение поверх окна и взаимодействие с ним.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147659#p147659" />
			<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><p>По F1 переключение в режим записи на экране.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-05-05T17:26:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147659#p147659</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изображение поверх окна и взаимодействие с ним.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147658#p147658" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, только сейчас появилась возможность протестировать ahk. Возможно ли печатать текст, не выводя gui окно?</p>]]></content>
			<author>
				<name><![CDATA[Morux2112]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41251</uri>
			</author>
			<updated>2021-05-05T16:29:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147658#p147658</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изображение поверх окна и взаимодействие с ним.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147651#p147651" />
			<content type="html"><![CDATA[<p>Не стоит ради одной строчки цитировать весь предыдущий пост, используйте кнопку «Ответить».<br /></p><div class="quotebox"><cite>Morux2112 пишет:</cite><blockquote><p>А на счёт &quot;перескакивания&quot; на следующую строчку, на определённые координаты?</p></blockquote></div><p>Я не очень представляю, как вы видите работу скрипта, но если требуется на экране удерживать текст в разных координатах, придётся создать ещё одно окно, такое как <em>Gui, Text</em>, и показывать его в нужном месте.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-05-04T16:17:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147651#p147651</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изображение поверх окна и взаимодействие с ним.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147649#p147649" />
			<content type="html"><![CDATA[<p>Благодарю. А на счёт &quot;перескакивания&quot; на следующую строчку, на определённые координаты?</p>]]></content>
			<author>
				<name><![CDATA[Morux2112]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41251</uri>
			</author>
			<updated>2021-05-04T15:52:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147649#p147649</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изображение поверх окна и взаимодействие с ним.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147646#p147646" />
			<content type="html"><![CDATA[<p>Вот простой пример, как можно интерактивно писать текст на экране:<br /></p><div class="codebox"><pre><code>X_Text := 500
Y_Text := 500
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

Gui, New,, Enter your text here
Gui, Add, Edit, w300 h100 gWriteText
Gui, Show, x0 y0
Return

GuiClose:
   ExitApp

WriteText:
   GuiControlGet, Edit1
   if (Edit1 = &quot;&quot;) {
      Gui, Text:Show, Hide
      Return
   }
   Gui, New
   Gui, Font, s%fontSize% q4, %fontName%
   Gui, Add, Text,, % Edit1
   GuiControlGet, Pos, Pos, Static1
   Gui, Destroy
   Gui, Text: Default
   GuiControl, Move, Static1, w%PosW% h%PosH%
   GuiControl,, Static1, % Edit1
   Gui, Show, NA x%X_Text% y%Y_Text% w%PosW% h%PosH%
   Return</code></pre></div><p>Правда, качество отрисовки не идеальное. Чтобы его улучшить, нужно использовать GDIPlus с помощью библиотеки Gdip.ahk.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-05-04T13:06:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147646#p147646</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изображение поверх окна и взаимодействие с ним.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147629#p147629" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, исправил</p>]]></content>
			<author>
				<name><![CDATA[Morux2112]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41251</uri>
			</author>
			<updated>2021-05-03T12:41:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147629#p147629</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изображение поверх окна и взаимодействие с ним.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147623#p147623" />
			<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>2021-05-03T10:23:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147623#p147623</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изображение поверх окна и взаимодействие с ним.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147621#p147621" />
			<content type="html"><![CDATA[<p>Вопрос стоит в том, как выводить текст в определённых координатах, напечатанный в реальном времени, и при нажатии на ентер переходит на следующие координаты, где так же печатается текст.</p>]]></content>
			<author>
				<name><![CDATA[Morux2112]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41251</uri>
			</author>
			<updated>2021-05-03T10:20:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147621#p147621</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изображение поверх окна и взаимодействие с ним.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147615#p147615" />
			<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>2021-05-02T21:53:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147615#p147615</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изображение поверх окна и взаимодействие с ним.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147614#p147614" />
			<content type="html"><![CDATA[<p>На этом форуме в ссылках scriptcoding через дефис. Вы её вручную, что ли писали? Можно было скопировать-вставить.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-05-02T21:45:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147614#p147614</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изображение поверх окна и взаимодействие с ним.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147613#p147613" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Morux2112 пишет:</cite><blockquote><p>Например, на выведенном изображении нажал на определённое место для ввода какого-то текста. После нажатия уже можно спокойно вводить нужный текст.</p></blockquote></div><p>Еще можно так: после активации нужно вводить текст в одно место, после нажатия на ентер - переходит к следующему.</p>]]></content>
			<author>
				<name><![CDATA[Morux2112]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41251</uri>
			</author>
			<updated>2021-05-02T21:45:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147613#p147613</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изображение поверх окна и взаимодействие с ним.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147612#p147612" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, странно, вставляю ссылку на тему с этого же форума, но ведёт непонятно куда. Вставил в скобки.</p>]]></content>
			<author>
				<name><![CDATA[Morux2112]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41251</uri>
			</author>
			<updated>2021-05-02T21:42:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147612#p147612</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изображение поверх окна и взаимодействие с ним.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147611#p147611" />
			<content type="html"><![CDATA[<p><strong>Morux2112</strong>, ваша ссылка непонятно куда ведёт.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-05-02T21:29:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147611#p147611</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Изображение поверх окна и взаимодействие с ним.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147610#p147610" />
			<content type="html"><![CDATA[<p>Доброй ночи. Нашел такую <a href="http://forum.script-coding.com/viewtopic.php?id=13956">тему</a>. Там сказано, как вывести изображение на экран поверх других окон. Но, можно ли сделать так, чтобы выводилось определённое изображение, высвечивался курсор и ты уже мог с ним взаимодействовать. Например, на выведенном изображении нажал на определённое место для ввода какого-то текста. После нажатия уже можно спокойно вводить нужный текст. В принципе реализовать вышеперечисленное не сложно, но есть пару момент. Как сделать, чтобы при вводе текста он сразу же отображался на изображении? И как вывести курсор, например, во время игры?</p>]]></content>
			<author>
				<name><![CDATA[Morux2112]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41251</uri>
			</author>
			<updated>2021-05-02T20:59:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147610#p147610</id>
		</entry>
</feed>
