<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Загрузить сохранить из поля Edit в ini файл]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=9285&amp;type=atom" />
	<updated>2014-02-23T16:16:11Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=9285</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузить сохранить из поля Edit в ini файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=80318#p80318" />
			<content type="html"><![CDATA[<p>Я в восторге, огромное спасибо <strong>sergeiplugatyr</strong> вам за помощь.</p>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2014-02-23T16:16:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=80318#p80318</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузить сохранить из поля Edit в ini файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=80315#p80315" />
			<content type="html"><![CDATA[<p>Вот так не пробовал?<br /></p><div class="codebox"><pre><code>Gui, Add, Edit, vDllCall3 -WantReturn Limit gMySubroutine, 

Gui, Add, Edit, vDllCall1 -WantReturn Limit gMySubroutine, 

Gui, Add, Edit, vDllCall2 -WantReturn Limit gMySubroutine, 

Gui, Add, Button, gSave, Save

Gui, Add, Button, gOpen, Open

Gui, Show, x557 y130 h171 w255, New GUI Window
Return

~vk78::
Suspend, toggle
return

*~lbutton::
while GetKeyState(&quot;LButton&quot;,&quot;P&quot;)
{
DllCall(&quot;Sleep&quot;, UInt, Time)
DllCall(&quot;mouse_event&quot;,uint,1,int,x,int,y,uint,0,int,0)
DllCall(&quot;Sleep&quot;, UInt, Timee)
}
Return

Save:
Gui Submit, NoHide
FileSelectFile, SelectedFile, S9, , сохранить макрос, *.ini

IniWrite, %DllCall3%, %SelectedFile%, xdirectory, dir3 
IniWrite, %DllCall1%, %SelectedFile%, ydirectory, dir1 
IniWrite, %DllCall2%, %SelectedFile%, sldirectory, dir2  

Return

Open:
Gui Submit, NoHide
FileSelectFile, SelectedFile, 9, , загрузить макрос, *.ini

IniRead, OutputVar3, %SelectedFile%, xdirectory, dir3, %A_Space%
IniRead, OutputVar1, %SelectedFile%, ydirectory, dir1, %A_Space%
IniRead, OutputVar2, %SelectedFile%, sldirectory, dir2, %A_Space%

GuiControl,, DllCall3, % OutputVar3
GuiControl,, DllCall1, % OutputVar1
GuiControl,, DllCall2, % OutputVar2

Return

Edit:
Return
MySubroutine:
Gui Submit, NoHide
Time := DllCall2%Sleep%
Timee := DllCall2%Sleep%
x := DllCall1%Move%
y := DllCall3%RMove%
Return
GuiClose:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[sergeiplugatyr]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30382</uri>
			</author>
			<updated>2014-02-23T15:19:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=80315#p80315</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузить сохранить из поля Edit в ini файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=80314#p80314" />
			<content type="html"><![CDATA[<p>Не могу разобраться с командой &quot;FileSelectFile&quot;. Написал скрипт на анти-отдачу, теперь хочу сделать сохранение профилей в &quot;ini&quot;файлы, и загрузку профилей из &quot;ini&quot;файлов.Мысль такая, из полей &quot;Edit&quot;, сохранить параметры в &quot;ini&quot;файл при нажатии кнопки &quot;Save&quot; , а при нажатии кнопки &quot;Open&quot; что бы можно было загрузить профиль из файла &quot;ini&quot;. Сейчас такая проблема, когда я сохраняю файл &quot;ini&quot; под своим именем, то сохраняет всё равно под именем &quot;program.ini&quot;.И когда пытаюсь загрузить другой файл &quot;ini&quot; открывает только файл &quot;program.ini&quot; . Возможно я не правильно соединил переменные &quot;FileSelectFile&quot; и &quot;IniWrite&quot;. Помогите пожалуйста.</p><div class="codebox"><pre><code>
Gui, Add, Edit, vDllCall3 -WantReturn Limit gMySubroutine, 

Gui, Add, Edit, vDllCall1 -WantReturn Limit gMySubroutine, 

Gui, Add, Edit, vDllCall2 -WantReturn Limit gMySubroutine, 

Gui, Add, Button, gSave, Save

Gui, Add, Button, gOpen, Open

Gui, Show, x557 y130 h171 w255, New GUI Window
Return

~vk78::
Suspend, toggle
return

*~lbutton::
while GetKeyState(&quot;LButton&quot;,&quot;P&quot;)
{
DllCall(&quot;Sleep&quot;, UInt, Time)
DllCall(&quot;mouse_event&quot;,uint,1,int,x,int,y,uint,0,int,0)
DllCall(&quot;Sleep&quot;, UInt, Timee)
}
Return

Save:
Gui Submit, NoHide
FileSelectFile, SelectedFile, S9, , сохранить макрос, *.ini

IniWrite, %DllCall3%, %A_WorkingDir%\program.ini, xdirectory, dir3 
IniWrite, %DllCall1%, %A_WorkingDir%\program.ini, ydirectory, dir1 
IniWrite, %DllCall2%, %A_WorkingDir%\program.ini, sldirectory, dir2  

Return

Open:
Gui Submit, NoHide
FileSelectFile, SelectedFile, 9, , загрузить макрос, *.ini

IniRead, OutputVar3, %A_ScriptDir%\program.ini, xdirectory, dir3, %A_Space%
IniRead, OutputVar1, %A_ScriptDir%\program.ini, ydirectory, dir1, %A_Space%
IniRead, OutputVar2, %A_ScriptDir%\program.ini, sldirectory, dir2, %A_Space%

GuiControl,, DllCall3, % OutputVar3
GuiControl,, DllCall1, % OutputVar1
GuiControl,, DllCall2, % OutputVar2

Return

Edit:
Return
MySubroutine:
Gui Submit, NoHide
Time := DllCall2%Sleep%
Timee := DllCall2%Sleep%
x := DllCall1%Move%
y := DllCall3%RMove%
Return
GuiClose:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2014-02-23T15:09:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=80314#p80314</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузить сохранить из поля Edit в ini файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=80297#p80297" />
			<content type="html"><![CDATA[<p><strong>Ядрён</strong>, обрати внимание на следующие строки:<br /></p><div class="quotebox"><blockquote><p>FileSelectFile, <strong>program</strong>, S1, , Select the program you would like to run, *.ini<br />IniWrite, %DllCall3%, %a_scriptdir%\<strong>program.ini</strong>, xdirectory, dir3</p></blockquote></div><p>В первой строке у тебя идет присвоение переменной <strong>program</strong>, но во второй вместо её использования название скрипта задано как <strong>program.ini</strong>. В части кода с <strong>IniRead</strong> ситуация аналогичная.</p>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2014-02-23T11:16:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=80297#p80297</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузить сохранить из поля Edit в ini файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=80293#p80293" />
			<content type="html"><![CDATA[<p>Приведите <span class="bbu">полный</span> код скрипта. Укажите, <span class="bbu">что конкретно</span> не получается.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-02-23T09:01:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=80293#p80293</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузить сохранить из поля Edit в ini файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=80292#p80292" />
			<content type="html"><![CDATA[<p>Подскажите что тут не так .</p>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2014-02-23T07:59:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=80292#p80292</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузить сохранить из поля Edit в ini файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=80263#p80263" />
			<content type="html"><![CDATA[<p>Почти разобрался, помогите с именем файла которое можно написать поле команды &quot;FileSelectFile&quot;.<br />Когда пытаюсь сохранить файл &quot;ini&quot; под своим именем, то сохраняет всё равно под именем &quot;program.ini&quot;.И когда пытаюсь открыть другой файл &quot;ini&quot; открывает только файл &quot;program.ini&quot;.<br /></p><div class="codebox"><pre><code>Save:
Gui Submit, NoHide

FileSelectFile, program, S1, , Select the program you would like to run, *.ini

IniWrite, %DllCall3%, %a_scriptdir%\program.ini, xdirectory, dir3 
IniWrite, %DllCall1%, %a_scriptdir%\program.ini, ydirectory, dir1 
IniWrite, %DllCall2%, %a_scriptdir%\program.ini, sldirectory, dir2 
Return

Open:
Gui Submit, NoHide
FileSelectFile, program, 1, , Select the program you would like to run, *.ini

IniRead, OutputVar3, %a_scriptdir%\program.ini, xdirectory, dir3
IniRead, OutputVar1, %a_scriptdir%\program.ini, ydirectory, dir1
IniRead, OutputVar2, %a_scriptdir%\program.ini, sldirectory, dir2

GuiControl,, DllCall3, % OutputVar3
GuiControl,, DllCall1, % OutputVar1
GuiControl,, DllCall2, % OutputVar2

Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2014-02-22T11:26:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=80263#p80263</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузить сохранить из поля Edit в ini файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=80249#p80249" />
			<content type="html"><![CDATA[<p>Ничего не понял, что куда, объясните пожалуйста.<br /></p><div class="codebox"><pre><code>IniRead, OutputVar, Filename, Section, Key [, Default]
IniWrite, Value, Filename, Section, Key</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2014-02-21T14:31:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=80249#p80249</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Загрузить сохранить из поля Edit в ini файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=80231#p80231" />
			<content type="html"><![CDATA[<p>Gui, Submit<br />GuiControl<br />GuiControlGet</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2014-02-21T03:29:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=80231#p80231</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Загрузить сохранить из поля Edit в ini файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=80215#p80215" />
			<content type="html"><![CDATA[<p>Доброго времени суток. Подскажите пожалуйста как сделать чтение и запись параметров из полей &quot;Edit&quot; по нажатию кнопок &quot;Open&quot; и &quot;Save&quot;.</p><div class="codebox"><pre><code>

Gui, Add, Edit, vDllCall3 gMySubroutine, 

Gui, Add, Edit, vDllCall1  gMySubroutine, 

Gui, Add, Edit, vDllCall2  gMySubroutine, 

Gui, Add, Button, gSave, Save

Gui, Add, Button, gOpen, Open

Gui, Show, x557 y130 h171 w255, New GUI Window
Return

*~lbutton::
while GetKeyState(&quot;LButton&quot;,&quot;P&quot;)
{
DllCall(&quot;Sleep&quot;, UInt, Time)
DllCall(&quot;mouse_event&quot;,uint,1,int,x,int,y,uint,0,int,0)
DllCall(&quot;Sleep&quot;, UInt, Timee)

}
Return

Save:
Gui Submit, NoHide
FileSelectFile, SelectedFile, S1, ,Сохранить файл, Текстовые файлы (*.ini)

return

Open:
Gui Submit, NoHide
FileSelectFile, SelectedFile, M1, ,Открыть файл, Текстовые файлы (*.ini)

return

Edit:
Return
MySubroutine:
Gui Submit, NoHide
Time := DllCall2%Sleep%

Timee := DllCall2%Sleep%

x := DllCall1%Move%

y := DllCall3%RMove%
Return
GuiClose:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2014-02-20T17:06:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=80215#p80215</id>
		</entry>
</feed>
