<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: GUI запоминает свои размеры-положение в ini]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=15600&amp;type=atom" />
	<updated>2020-08-22T10:27:20Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15600</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI запоминает свои размеры-положение в ini]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141805#p141805" />
			<content type="html"><![CDATA[<p><strong>Megamen</strong>, если хотите заказать скрипт за плату, у нас есть <a href="http://forum.script-coding.com/viewforum.php?id=28">Коммерческий раздел</a>. Если хотите обратиться к кому-либо лично, есть чат (кнопка вверху справа).</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-08-22T10:27:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141805#p141805</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI запоминает свои размеры-положение в ini]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141801#p141801" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Megamen пишет:</cite><blockquote><p>Я денег заплачу.</p></blockquote></div><p>Мне зарплаты хватает. Возможно тут есть кто-то кому не хватает, пиши им.</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2020-08-21T13:21:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141801#p141801</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI запоминает свои размеры-положение в ini]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141797#p141797" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Alectric пишет:</cite><blockquote><p>Хочу спросить о другом скрипте.<br />Спрашивай на форуме.</p></blockquote></div><p>Я денег заплачу.</p>]]></content>
			<author>
				<name><![CDATA[Megamen]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39581</uri>
			</author>
			<updated>2020-08-21T04:49:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141797#p141797</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI запоминает свои размеры-положение в ini]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141795#p141795" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Megamen пишет:</cite><blockquote><p>зачем именно хэндл</p></blockquote></div><p>Затем что это:<br /></p><div class="quotebox"><cite>Alectric пишет:</cite><blockquote><p>уникальный идентификационный номер (HWND/handle)</p></blockquote></div><p>100% скрипт не перепутает окно с другим, если title совпадет, или если ты несколько таких же окон создашь, запустишь один и тот-же скрипт несколько раз.<br /></p><div class="quotebox"><cite>Megamen пишет:</cite><blockquote><p>Можно использовать title, вместо хэндла ?</p></blockquote></div><p>Можно.<br /></p><div class="quotebox"><cite>Megamen пишет:</cite><blockquote><p>Хочу спросить о другом скрипте.</p></blockquote></div><p>Спрашивай на форуме. Знаешь, как бывает: сегодня у меня есть настроение помочь, а завтра нет.</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2020-08-20T12:46:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141795#p141795</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI запоминает свои размеры-положение в ini]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141790#p141790" />
			<content type="html"><![CDATA[<p><strong>Alectric</strong>, напишите свой адрес электронной почты.<br />Хочу спросить о другом скрипте.</p>]]></content>
			<author>
				<name><![CDATA[Megamen]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39581</uri>
			</author>
			<updated>2020-08-20T02:51:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141790#p141790</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI запоминает свои размеры-положение в ini]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141789#p141789" />
			<content type="html"><![CDATA[<p>А зачем именно хэндл нужно брать в переменную ?<br />Можно использовать title, вместо хэндла ?</p>]]></content>
			<author>
				<name><![CDATA[Megamen]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39581</uri>
			</author>
			<updated>2020-08-20T02:45:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141789#p141789</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI запоминает свои размеры-положение в ini]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141788#p141788" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Gui,+resize
Gui,+hwndhMainWinID ; берем хендл окна в переменную hMainWinID
IniRead, W, %A_ScriptDir%\параметры.ini, ширина, W
IniRead, H, %A_ScriptDir%\параметры.ini, высота, H
IniRead, X, %A_ScriptDir%\параметры.ini, коордX, X
IniRead, Y, %A_ScriptDir%\параметры.ini, коордY, Y

Gui, Show
winmove,ahk_id %hMainWinID%,,x,y,w,h
return


GuiClose:
GuiEscape:
WinGetPos,X,Y,W,H,ahk_id %hMainWinID%
IniWrite, %W%, %A_ScriptDir%\параметры.ini, ширина,W
IniWrite, %H%, %A_ScriptDir%\параметры.ini, высота,H
IniWrite, %X%, %A_ScriptDir%\параметры.ini, коордX,X
IniWrite, %Y%, %A_ScriptDir%\параметры.ini, коордY,Y
exitapp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2020-08-20T02:25:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141788#p141788</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI запоминает свои размеры-положение в ini]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141787#p141787" />
			<content type="html"><![CDATA[<p>Или можно &quot;guisize:&quot;&nbsp; каким-то другим способом ввести - без знака &quot;:&quot; (не циклом, а простой командой) ?</p><p>Например guisize, W:=a_guiwidth, H:=a_guiheight</p>]]></content>
			<author>
				<name><![CDATA[Megamen]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39581</uri>
			</author>
			<updated>2020-08-20T02:22:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141787#p141787</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI запоминает свои размеры-положение в ini]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141786#p141786" />
			<content type="html"><![CDATA[<p>Alectric, ясно. <br />А как сразу - без дополнительных корректировок в виде <br /></p><div class="codebox"><pre><code>guisize:
W:=a_guiwidth
H:=a_guiheight
return</code></pre></div><p>надежно без смещения установить размеры и координаты gui (одной командой при открытии) ?</p>]]></content>
			<author>
				<name><![CDATA[Megamen]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39581</uri>
			</author>
			<updated>2020-08-20T02:20:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141786#p141786</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI запоминает свои размеры-положение в ini]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141779#p141779" />
			<content type="html"><![CDATA[<p><a href="http://www.script-coding.com/AutoHotkey/OnExit.html">OnExit</a>.</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2020-08-19T15:56:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141779#p141779</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI запоминает свои размеры-положение в ini]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141778#p141778" />
			<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>2020-08-19T13:44:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141778#p141778</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI запоминает свои размеры-положение в ini]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141777#p141777" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Gui,+resize
Gui,+hwndhMainWinID ; берем хендл окна в переменную hMainWinID
IniRead, W, %A_ScriptDir%\параметры.ini, ширина, W
IniRead, H, %A_ScriptDir%\параметры.ini, высота, H
IniRead, X, %A_ScriptDir%\параметры.ini, коордX, X
IniRead, Y, %A_ScriptDir%\параметры.ini, коордY, Y

Gui, Show,x%X% y%Y% w%W% h%H%
return

guisize:
W:=a_guiwidth
H:=a_guiheight
return

GuiClose:
GuiEscape:
WinGetPos,X,Y,,,ahk_id %hMainWinID%
IniWrite, %W%, %A_ScriptDir%\параметры.ini, ширина,W
IniWrite, %H%, %A_ScriptDir%\параметры.ini, высота,H
IniWrite, %X%, %A_ScriptDir%\параметры.ini, коордX,X
IniWrite, %Y%, %A_ScriptDir%\параметры.ini, коордY,Y
exitapp

</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2020-08-19T13:11:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141777#p141777</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI запоминает свои размеры-положение в ini]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141774#p141774" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>WinGetPos даёт внешние размеры окна, а Gui, Show устанавливает внутренние.</p></blockquote></div><div class="quotebox"><blockquote><p>Запустил - размеры сохраняет загружает, а то что на пару пикселей сдвинулось не заметил.</p></blockquote></div><p><strong>Alectric</strong>, Скажите - а как в этом скрипте - поставить надежные размеры и координаты окна - чтобы не было этого смещения на пару пикселей ?<br />Потому что при частом использовании - размеры окна все больше искажаются и цель скрипта теряет свой смысл.</p>]]></content>
			<author>
				<name><![CDATA[Megamen]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39581</uri>
			</author>
			<updated>2020-08-19T04:14:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141774#p141774</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI запоминает свои размеры-положение в ini]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141739#p141739" />
			<content type="html"><![CDATA[<p>Alectric, спасибо - вроде все работает.</p>]]></content>
			<author>
				<name><![CDATA[Megamen]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39581</uri>
			</author>
			<updated>2020-08-17T04:06:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141739#p141739</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI запоминает свои размеры-положение в ini]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141738#p141738" />
			<content type="html"><![CDATA[<p>Проверяю. Просто я недостаточно внимателен, не знаю что с собой поделать на этот счет. Запустил - размеры сохраняет загружает, а то что на пару пикселей сдвинулось не заметил.</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2020-08-17T02:37:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141738#p141738</id>
		</entry>
</feed>
