<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Замена обычной кнопки на custom (img) кнопку]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12392&amp;type=atom" />
	<updated>2017-02-12T12:20:36Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12392</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Замена обычной кнопки на custom (img) кнопку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=112256#p112256" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>ButtonTexture1 := {normal:LoadPicture(&quot;2.png&quot;)	,	clicked:LoadPicture(&quot;1.png&quot;)}

Gui, Color, c161643
Gui, Add, Picture, xp+20 yp+250 gButtonStartNorecoil HWNDID_BT1 , % &quot;HBITMAP:*&quot; ButtonTexture1.normal
Gui, Add, Progress, ce0760b vMyProgress w416 Background161643
Gui, Add, Text, cd0cdd8 vMyText wp
Gui, Show, w450 h350, Тут название окна
return

ButtonStartNorecoil:

GuiControl,, MyProgress, 0
GuiControl, , % ID_BT1 , % &quot;HBITMAP:*&quot; ButtonTexture1.clicked

Loop, %A_WinDir%\*.*
{
    if A_Index = 100
        break
    GuiControl,, MyProgress, +5
    GuiControl,, MyText, %A_LoopFileName%
    Sleep 50
}
GuiControl,, MyText, Тут текст после нажатия.
GuiControl, , % ID_BT1 , % &quot;HBITMAP:*&quot; ButtonTexture1.normal
return

GuiClose:
Gui, Cancel</code></pre></div>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2017-02-12T12:20:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=112256#p112256</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Замена обычной кнопки на custom (img) кнопку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111773#p111773" />
			<content type="html"><![CDATA[<p>Здравствуйте, с ahk не так давно начали работать. И возник небольшой вопрос. <br />Имеется такой скрипт.</p><div class="codebox"><pre><code>UrlDownloadToFile, Ссылка на фон, % f := A_Temp &quot;\temp_pic&quot;
Gui, Color, c161643
Gui, Add, Picture, x0 y0 h350 w450, % f
Gui, Add, Button, Default xp+20 yp+250, Название кнопки
Gui, Add, Progress, ce0760b vMyProgress w416 Background161643
Gui, Add, Text, cd0cdd8 vMyText wp
Gui, Show, w450 h350, Тут название окна
return

ButtonStartNorecoil:
Loop, %A_WinDir%\*.*
{
    if A_Index = 100
        break
    GuiControl,, MyProgress, +5
    GuiControl,, MyText, %A_LoopFileName%
    Sleep 50
}
GuiControl,, MyText, Тут текст после нажатия.
return

GuiClose:
Gui, Cancel</code></pre></div><p>Задача следующая, заменить стандартную кнопку заменить на кастом кнопку (те что в архиве). При простое должна быть видна кнопка 2.png, а при нажатии переключатся на 1.png, и соответственно после нажатия ползунок с загрузкой должен работать. Спасибо заранее.</p>]]></content>
			<author>
				<name><![CDATA[mek]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34593</uri>
			</author>
			<updated>2017-02-01T17:28:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111773#p111773</id>
		</entry>
</feed>
