<?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=12824&amp;type=atom" />
	<updated>2017-07-22T15:14:03Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12824</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечение картинки из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117466#p117466" />
			<content type="html"><![CDATA[<p>А что там за ярлыки, на что они ссылаются? На exe-файлы приложений, или ещё что-то?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-07-22T15:14:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117466#p117466</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечение картинки из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117465#p117465" />
			<content type="html"><![CDATA[<p>Это не одноразово , я делаю менюшку куда ярлыки можно запихивать .Раз,два и новый файл искать...</p>]]></content>
			<author>
				<name><![CDATA[shahlik002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37352</uri>
			</author>
			<updated>2017-07-22T12:22:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117465#p117465</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечение картинки из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117460#p117460" />
			<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>2017-07-22T10:41:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117460#p117460</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечение картинки из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117449#p117449" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />А проанализировать пиксели , их цвет и количество?<br />Ну или отобразить хотя бы посередине?</p>]]></content>
			<author>
				<name><![CDATA[shahlik002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37352</uri>
			</author>
			<updated>2017-07-22T06:09:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117449#p117449</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечение картинки из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117444#p117444" />
			<content type="html"><![CDATA[<p>У меня ваш ярлык выглядит так:</p><p><span class="postimg"><img src="http://i.imgur.com/kInQO2d.png" alt="http://i.imgur.com/kInQO2d.png" /></span></p><p>У меня ведь нет файла, на который он ссылается.</p><div class="quotebox"><cite>shahlik002 пишет:</cite><blockquote><p>Так вот в JUMBO находиться картинка EXTRALARGE в левом верхнем углу , а остальное - пустое место.</p></blockquote></div><p>Ну значит только такая картинка есть, ничего не поделаешь.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-07-21T22:05:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117444#p117444</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечение картинки из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117411#p117411" />
			<content type="html"><![CDATA[<p>Извлекается то хорошо , но сам ярлык имеет плохую картинку в JUMBO .<br />Вот архив.</p><p>Там бы просто проверить на количество пустого места.<br />JUMBO =256*256<br />EXTRALARGE=48*48<br />Так вот в JUMBO находиться картинка EXTRALARGE в левом верхнем углу , а остальное - пустое место.</p><p>Мне нужно просто извлечь в наилучшем качестве.</p>]]></content>
			<author>
				<name><![CDATA[shahlik002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37352</uri>
			</author>
			<updated>2017-07-20T16:01:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117411#p117411</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечение картинки из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117409#p117409" />
			<content type="html"><![CDATA[<p>Код по-разному можно использовать. Файл можно закачать на какой-нибудь облачный сервис. Нужены также размеры картинки, которые будут указаны в GUI.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-07-20T14:17:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117409#p117409</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечение картинки из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117408#p117408" />
			<content type="html"><![CDATA[<p>Код твой , картинка с ярлыка игры стим.<br />Прикрепить не могу , интерфейс не поддерживается .</p>]]></content>
			<author>
				<name><![CDATA[shahlik002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37352</uri>
			</author>
			<updated>2017-07-20T12:19:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117408#p117408</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечение картинки из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117407#p117407" />
			<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>2017-07-19T21:21:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117407#p117407</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечение картинки из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117397#p117397" />
			<content type="html"><![CDATA[<p>Некоторые иконки формата JUMBO отображаются не корректно .<br />Картинка такая же как и в EXTRALARGE только находиться в уголку , притом занимая больше места под контрол.<br />Что делать?</p>]]></content>
			<author>
				<name><![CDATA[shahlik002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37352</uri>
			</author>
			<updated>2017-07-19T11:21:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117397#p117397</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечение картинки из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117396#p117396" />
			<content type="html"><![CDATA[<p>Вроде бы разобрался.</p>]]></content>
			<author>
				<name><![CDATA[shahlik002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37352</uri>
			</author>
			<updated>2017-07-19T09:51:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117396#p117396</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечение картинки из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117395#p117395" />
			<content type="html"><![CDATA[<p>А еще мне бы понять куда ваш код примкнуть , ибо иногда не рисует с разными размерами сторон . <br />А если перерисовывать при одних и тех же то вообще разные результаты выдает . <img src="//forum.script-coding.com/img/smilies/big_smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[shahlik002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37352</uri>
			</author>
			<updated>2017-07-19T05:48:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117395#p117395</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечение картинки из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117394#p117394" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Та что уж там файл , записки они ведь встроенные в винду.<br />А скрипт вот<br /></p><div class="codebox"><pre><code>#NoEnv
IniRead, OutputVarSectionNames, settings.ini
Loop, Parse, OutputVarSectionNames,`n
{
IniRead,sx,settings.ini,%A_LoopField%,sx
IniRead,sy,settings.ini,%A_LoopField%,sy
IniRead,sw,settings.ini,%A_LoopField%,sw
IniRead,sh,settings.ini,%A_LoopField%,sh
IniRead,x,settings.ini,%A_LoopField%,x
gui,gui1:add,Picture,x%sx% y%sy% w%sh% h%sw% v%A_LoopField% gPic,%x%
}

x=%A_ScriptDir%\+2.bmp
h:=A_ScreenHeight+3
rw:=A_ScreenWidth//25-2
rh:=A_ScreenHeight//25-2

gui,gui1:color,0x464646,
gui,gui1:show, w%A_ScreenWidth% h%h%
gui,gui1:add,Picture,x0 y5 h50 w50 vPT gPic,+2.bmp
GuiControl,gui1:hide,PT

gui,gui3:+AlwaysOnTop -Resize
gui,gui3:add,Slider,vsx gsx x1 y1   Range0-%rw% ToolTiptop	h25 page1,0 
gui,gui3:add,Slider,vsy gsy x1 y26   Range0-%rh% ToolTiptop	h25 page1,0
gui,gui3:add,Slider,vsw gsw x1 y51   Range1-6 ToolTiptop		h25 page1,2
gui,gui3:add,Slider,vsh gsh x1 y76   Range1-6 ToolTiptop		h25 page1,2
gui,gui3:add,Edit,vE1 y1 x130 w100
gui,gui3:add,Button,vB1 gB1 w35 h25 y26 x130,+
gui,gui3:add,Button,vB2 gB2 w35 h25 y26 x165,Save
gui,gui3:add,Button,vB3 gB3 w35 h25 y26 x165,Save
return

gui3guiclose:
GuiControl,gui1:hide,PT
gui,gui3:hide
GuiControl,gui3:Show,b2
GuiControl,gui3:hide,b3
return

gui1GuiClose:
gui1GuiEscape:
Esc::
ExitApp

b1:
FileSelectFile,x ;,35
GuiControl,gui1:,PT,%x%
c:=RegExReplace(x,&quot;.*\\&quot;,&quot;&quot;)
c:=RegExReplace(c,&quot;\..*&quot;,&quot;&quot;)
GuiControl,text,e1,%c%
return
b2:
if x=+2.bmp or x=1
	{
	MsgBox, 16, Error, файл не выбран
	return
	}
gosub,3subm
gosub iniwrite
gui,gui1:add,Picture,x%sx% y%sy% w%sw% h%sh% v%e1% gPic,%x%
GuiControl,gui1:,PT,%A_ScriptDir%\+2.bmp
x=%A_ScriptDir%\+2.bmp
gui,gui3:hide
return

b3:
gosub 3subm
gosub iniwrite
GuiControl,gui1:move,%f3%,x%sx% y%sy% w%sw% h%sh%
GuiControl,gui1:,%f3%,%x%
GuiControl,gui1:show,%f3%
GuiControl,text,e1,
GuiControl,gui1:,PT,%A_ScriptDir%\+2.bmp
GuiControl,gui3:Show,b2
GuiControl,gui3:hide,b3
gui,gui3:hide
GuiControl,gui1:hide,pt
x=%A_ScriptDir%\+2.bmp
return

iniwrite:
IniWrite,%sx%,settings.ini,%e1%,sx
IniWrite,%sy%,settings.ini,%e1%,sy
IniWrite,%sw%,settings.ini,%e1%,sw
IniWrite,%sh%,settings.ini,%e1%,sh
IniWrite,%x%,settings.ini,%e1%,x
return

f1::
GuiControl,gui1:show,PT
gui,gui3:show,,3
return

sx:
sy:
sw:
sh:
gosub,3subm
GuiControl,gui1:move,PT,x%sx% y%sy% w%sw% h%sh%
GuiControl,gui1:,PT,%x%
return

3subm:
gui,gui3:submit,nohide
sx:=sx*25
sy:=sy*25+5
sw:=sw*25
sh:=sh*25
return

Pic:
GetKeyState,f2,f2
GetKeyState,f3,f3
if f2=d
{
IniDelete,settings.ini,%A_GuiControl%

GuiControl,gui1:hide,%A_GuiControl%
return
}
if f3=d
{
f3:=A_GuiControl
IniRead,sx,settings.ini,%A_GuiControl%,sx
IniRead,sy,settings.ini,%A_GuiControl%,sy
IniRead,sw,settings.ini,%A_GuiControl%,sw
IniRead,sh,settings.ini,%A_GuiControl%,sh
GuiControl,gui3:text,sx,% sx//25
GuiControl,gui3:text,sy,% sy//25
GuiControl,gui3:text,sw,% sw//25
GuiControl,gui3:text,sh,% sh//25
IniRead,x,settings.ini,%A_GuiControl%,x

GuiControl,gui3:text,e1,%A_GuiControl%

GuiControl,gui3:hide,b2
GuiControl,gui3:show,b3
gui,gui3:show,,3


GuiControl,gui1:hide,%A_GuiControl%
GuiControl,gui1:move,PT,x%sx% y%sy% w%sw% h%sh%
GuiControl,gui1:,PT,%x%
GuiControl,gui1:show,PT
return
}
IniRead,x,settings.ini,%A_GuiControl%,x
run,%x%
return</code></pre></div><p>Я там немного намудрил с именами контролов , надеюсь что то да подскажете.</p><p>За помощь спасибо , неплохо бы еще мне по полочкам разложить что значат эти строки и зачем они там.</p>]]></content>
			<author>
				<name><![CDATA[shahlik002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37352</uri>
			</author>
			<updated>2017-07-19T05:21:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117394#p117394</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечение картинки из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117392#p117392" />
			<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>2017-07-18T19:48:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117392#p117392</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечение картинки из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117386#p117386" />
			<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>2017-07-18T18:45:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117386#p117386</id>
		</entry>
</feed>
