<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Picture элемент управления!]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12164&amp;type=atom" />
	<updated>2016-11-22T21:08:45Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12164</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Picture элемент управления!]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=109293#p109293" />
			<content type="html"><![CDATA[<p>А, да. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /> А Gui, Submit почему-то не работает, это меня с толку и сбило.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-11-22T21:08:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=109293#p109293</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Picture элемент управления!]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=109292#p109292" />
			<content type="html"><![CDATA[<p>Можно проще:<br /></p><div class="codebox"><pre><code>Gui, Add, Picture,vVar x0 y0 w10 h10 , %A_WorkingDir%\Picture.png
Gui, Show, w10 h10, Pro100GUI
return

f11::
GuicontrolGet, Var
MsgBox, % Var
Return</code></pre></div><p><a href="https://autohotkey.com/docs/commands/GuiControlGet.htm">https://autohotkey.com/docs/commands/GuiControlGet.htm</a><br /></p><div class="quotebox"><blockquote><p>Sub-commands</p><p>(Blank): Leave Sub-command blank to retrieve the control&#039;s contents. All control types are self-explanatory except the following:</p><p>Picture: Retrieves the picture&#039;s file name as it was originally specified when the control was created. This name does not change even if a new picture file name is specified.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2016-11-22T20:59:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=109292#p109292</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Picture элемент управления!]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=109289#p109289" />
			<content type="html"><![CDATA[<p>А хотя нет, вру, можно:<br /></p><div class="codebox"><pre><code>Gui, Add, Picture,vVar x0 y0 w10 h10 hwndhPic, %A_WorkingDir%\Picture.png
Gui, Show, w10 h10, Pro100GUI
return


sc1: ;При нажатии Esc на экран должен выводиться путь к изображению
VarSetCapacity(buff, 256 * (A_IsUnicode ? 2 : 1), 0)
SendMessage, WM_GETTEXT := 0xD, 256, &amp;buff,, ahk_id %hPic%
MsgBox, % StrGet(&amp;buff)
return


GuiClose:
ExitApp</code></pre></div><p>Ну, или так:<br /></p><div class="codebox"><pre><code>Gui, Add, Picture,vVar x0 y0 w10 h10 hwndhPic, %A_WorkingDir%\Picture.png
Gui, Show, w10 h10, Pro100GUI
return


sc1: ;При нажатии Esc на экран должен выводиться путь к изображению
ControlGetText, text,, ahk_id %hPic%
MsgBox, % text
return


GuiClose:
ExitApp</code></pre></div><p><strong>minesemka</strong>, в конце предложения лучше ставить точку, а не восклицательный знак, а заголовке вообще ничего не нужно.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-11-22T20:06:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=109289#p109289</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Picture элемент управления!]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=109288#p109288" />
			<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>2016-11-22T19:43:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=109288#p109288</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Picture элемент управления!]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=109282#p109282" />
			<content type="html"><![CDATA[<p>Вероятно, никак. После отображения файл может быть удалён. Файл может отсутствовать изначально:<br /></p><div class="quotebox"><blockquote><p>[v1.1.23+]: A bitmap or icon handle can be used instead of a filename. For example, HBITMAP:%handle%.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Мальчик-гей]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30832</uri>
			</author>
			<updated>2016-11-22T17:53:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=109282#p109282</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Picture элемент управления!]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=109274#p109274" />
			<content type="html"><![CDATA[<p>Здравствуйте, меня заинтересовал 1 вопрос!<br />Как узнать путь к картинки?</p><p>Вот код, чтобы вы понимали чего я хочу добиться!<br /></p><div class="codebox"><pre><code>Gui, Add, Picture,vVar x0 y0 w10 h10 , %A_WorkingDir%\Picture.png
Gui, Show, w10 h10, Pro100GUI
return


sc1: ;При нажатии Esc на экран должен выводиться путь к изображению
gui, submit, nohide
MsgBox, %Var% ;Переменная должна содержать путь к файлу (%A_WorkingDir%\Picture.png)
return


GuiClose:
ExitApp</code></pre></div><p>Если можно, дайте ответ кодом на основе моего!<br />Заранее спасибо!</p>]]></content>
			<author>
				<name><![CDATA[minesemka]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33949</uri>
			</author>
			<updated>2016-11-22T08:05:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=109274#p109274</id>
		</entry>
</feed>
