<?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=4753&amp;type=atom" />
	<updated>2013-03-03T13:37:41Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=4753</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: создание изображений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69915#p69915" />
			<content type="html"><![CDATA[<p>Не смог разобратся. <br />Как мне на моём рисунке, в нужных координатах вставить например другой рисунок с нужным (заданным скриптом) размером?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-03-03T13:37:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69915#p69915</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: создание изображений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=40407#p40407" />
			<content type="html"><![CDATA[<p>Спасибо!</p>]]></content>
			<author>
				<name><![CDATA[VOLK666]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25998</uri>
			</author>
			<updated>2010-10-13T10:39:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=40407#p40407</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: создание изображений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=40392#p40392" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>VOLK666 пишет:</cite><blockquote><p>Есть <a href="http://www.autohotkey.com/forum/topic32238.html">http://www.autohotkey.com/forum/topic32238.html</a>, но это вроде не совсем то...</p></blockquote></div><p>Да ладно? <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /></p><div class="codebox"><pre><code>#NoEnv
SetBatchLines, -1

Text = Текущее время`n`n      %A_Hour%:%A_Min%:%A_Sec%
File = %A_Desktop%\Time.jpg

; Uncomment if Gdip.ahk is not in your standard library
;#Include, Gdip.ahk

; Start gdi+
If !pToken := Gdip_Startup()
{
   MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
   ExitApp
}

; Create a 300x300 pixel gdi+ bitmap
pBitmap := Gdip_CreateBitmap(300, 300)

; Get a pointer to the graphics of the bitmap, for use with drawing functions
G := Gdip_GraphicsFromImage(pBitmap)

; Set the smoothing mode to antialias = 4 to make shapes appear smoother (only used for vector drawing and filling)
Gdip_SetSmoothingMode(G, 4)

; Create a blue brush
pBrush := Gdip_BrushCreateSolid(0xff0000ff)

Gdip_FillRectangle(G, pBrush, 0, 0, 300, 300)

Gdip_DeleteBrush(pBrush)

Gdip_TextToGraphics(G, Text, &quot;x36 y0 w300 h300 cffffffff r4 s30 Italic vCenter&quot;, &quot;Arial&quot;)

Gdip_SaveBitmapToFile(pBitmap, File, 100)

; The bitmap can be deleted
Gdip_DisposeImage(pBitmap)

; The graphics may now be deleted
Gdip_DeleteGraphics(G)

; ...and gdi+ may now be shutdown
Gdip_Shutdown(pToken)
ExitApp
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2010-10-12T20:23:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=40392#p40392</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: создание изображений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=40385#p40385" />
			<content type="html"><![CDATA[<p>Можно обратиться к теме AutoHotkey: Сохранить маленький произвольный кусок экрана <a href="http://forum.script-coding.com/viewtopic.php?id=3328&amp;p=3">http://forum.script-coding.com/viewtopi … 28&amp;p=3</a>.<br /></p><div class="codebox"><pre><code>F12::
FileName := A_DD &quot;.&quot; A_MM &quot;.&quot; A_YEAR &quot;=&quot; A_Hour &quot;Hour&quot; A_Min &quot;Min&quot; A_Sec &quot;Sec.bmp&quot;
DetectHiddenWindows, On
SendInput {PRINTSCREEN} ; снимок всего экрана (PrtSc)
FileAppend,, %FileName%
Run, MSPaint %FileName%,, Hide
WinWait, ahk_class MSPaintApp
PostMessage, 0x111, 57637, 0, , ahk_class MSPaintApp
PostMessage, 0x111, 57603, 0, , ahk_class MSPaintApp
PostMessage, 0x111, 57665, 0, , ahk_class MSPaintApp
Return</code></pre></div><p>Остаётся только воспользоваться инструментом &quot;Надпись&quot;. Возможно, придётся отказаться от скрытого окна.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2010-10-12T18:03:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=40385#p40385</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: создание изображений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=40381#p40381" />
			<content type="html"><![CDATA[<p>Сможете такое написать? Я нет)</p>]]></content>
			<author>
				<name><![CDATA[VOLK666]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25998</uri>
			</author>
			<updated>2010-10-12T17:02:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=40381#p40381</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: создание изображений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=40378#p40378" />
			<content type="html"><![CDATA[<p>Первое, что в голову приходит - через Paint. <img src="//forum.script-coding.com/img/smilies/big_smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2010-10-12T16:03:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=40378#p40378</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: создание изображений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=40377#p40377" />
			<content type="html"><![CDATA[<p>Есть <a href="http://www.autohotkey.com/forum/topic32238.html">http://www.autohotkey.com/forum/topic32238.html</a>, но это вроде не совсем то...</p>]]></content>
			<author>
				<name><![CDATA[VOLK666]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25998</uri>
			</author>
			<updated>2010-10-12T15:58:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=40377#p40377</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: создание изображений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=37938#p37938" />
			<content type="html"><![CDATA[<p>Есть ли примеры реализации создания изображений с каким-либо текстом?<br />Например, функция пишет текущее время в файл time.jpg. То-есть аналог библиотеки GD2 на PHP.</p>]]></content>
			<author>
				<name><![CDATA[VOLK666]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25998</uri>
			</author>
			<updated>2010-07-23T17:03:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=37938#p37938</id>
		</entry>
</feed>
