<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Сохранение значения переменной в Ini-файл]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12960&amp;type=atom" />
	<updated>2017-08-31T16:28:16Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12960</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение значения переменной в Ini-файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=119013#p119013" />
			<content type="html"><![CDATA[<p><strong>belyankin12</strong><br />Спасибо. Вопросов впринцыпе больше нет</p>]]></content>
			<author>
				<name><![CDATA[aktor311]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38738</uri>
			</author>
			<updated>2017-08-31T16:28:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=119013#p119013</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение значения переменной в Ini-файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=119012#p119012" />
			<content type="html"><![CDATA[<p>Чтобы заставить скрипт перезагрузиться с новыми параметрами. Согласен, что это необязательно, но для визуального отображения и удобства это самый лучший вариант.</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2017-08-31T16:23:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=119012#p119012</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение значения переменной в Ini-файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=119011#p119011" />
			<content type="html"><![CDATA[<p><strong>belyankin12</strong><br />Почему тут нужен Reload?<br /></p><div class="codebox"><pre><code>Save:
Gui, submit, NoHide
IniWrite,  %Key1%, %ini%, Hotkeys, Key1
Reload
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[aktor311]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38738</uri>
			</author>
			<updated>2017-08-31T16:20:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=119011#p119011</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение значения переменной в Ini-файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118998#p118998" />
			<content type="html"><![CDATA[<p>Нет. Посмотрите на свой код и скопируйте каждую строчку, которая вам непонятна, я вам объясню принцип действия. А как поймете все, вы сами уже сможете написать себе все.</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2017-08-31T14:17:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118998#p118998</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение значения переменной в Ini-файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118991#p118991" />
			<content type="html"><![CDATA[<p><strong>belyankin12</strong><br />А если в этом же скрипте я хочу так же сделать второй хоткей и вторую кнопку то мне нужно снова писать это:<br /></p><div class="codebox"><pre><code>global ini := &quot;IniFile.ini&quot;
ifExist, %ini%
    goto true
else
    goto false

false:
IniWrite, Key, %ini%, Hotkeys, Key1
goto true

true:
IniRead, Dm, %ini%, Hotkeys, Key1</code></pre></div><p>?<br />Например так:<br /></p><div class="codebox"><pre><code>global ini := &quot;IniFile.ini&quot;
ifExist, %ini%
    goto true
else
    goto false

false:
IniWrite, Key, %ini%, Hotkeys, Key1
goto true

true:
IniRead, Dm, %ini%, Hotkeys, Key1

global ini := &quot;IniFile2.ini&quot;
ifExist, %ini%
    goto true
else
    goto false
false:
IniWrite, Key, %ini%, Hotkeys, Key2
goto true

true:
IniRead, Dm2, %ini%, Hotkeys, Key2



Gui, Font, S16 CGray, Verdana
FileInstall, C:\Users\User\Desktop\1470403006_geroi.png, %A_temp%\1470403006_geroi.png
Gui, Add, Picture, x-38 y-10 w520 h560 , %A_temp%\1470403006_geroi.png
Gui, Add, Text, x22 y10 w210 h30 BackgroundTrans, Введите клавишу.
Gui, Add, Text, x22 y60 w100 h30 BackgroundTrans, Броня
Gui, Add, Text, x282 y60 w100 h30 BackgroundTrans, Баты
Gui, Add, Hotkey, x52 y110 w100 h30 vKey1, %Dm%
Gui, Add, Hotkey, x312 y110 w100 h30 , 
Gui, Add, Text, x2 y110 w30 h30 BackgroundTrans, 1.
Gui, Add, Text, x2 y160 w30 h30 BackgroundTrans, 2
Gui, Add, Hotkey, x52 y160 w100 h30 vKey2, %Dm2%
Gui, Add, Hotkey, x312 y160 w100 h30 , 
Gui, Add, Text, x2 y210 w30 h30 BackgroundTrans, 3.
Gui, Add, Text, x2 y260 w30 h30 BackgroundTrans, 4.
Gui, Add, Hotkey, x312 y210 w100 h30 , 
Gui, Add, Hotkey, x312 y260 w100 h30 , 
Gui, Add, Button, x422 y110 w40 h30 , Ок
Gui, Add, Button, x422 y160 w40 h30 , Ок
Gui, Add, Button, x422 y210 w40 h30 , Ок
Gui, Add, Button, x422 y260 w40 h30 , Ок
Gui, Add, Button, x162 y110 w40 h30 gSave, Ок
Gui, Add, Button, x162 y160 w40 h30 gSave2, Ок
Gui, Show, w478 h438, Броня и баты

Gui, Submit, NoHide
Hotkey, %Key1%, MyKey1, On, UseErrorLevel
return
MyKey1: 
{
	Send, {sc12}
	MouseMove, 418, 510 
	Send, {Lbutton}
	MouseMove, 497, 312
	Send, {Lbutton}
	MouseMove, 418, 510
	Send, {Lbutton}
	MouseMove, 418, 535
	Send, {Lbutton}
	MouseMove, 497, 347
	Send, {Lbutton}
	MouseMove, 418, 535
	Send, {Lbutton}
	MouseMove, 418, 570
	Send, {Lbutton}
	MouseMove, 497, 382
	Send, {Lbutton}
	MouseMove, 418, 570
	Send, {Lbutton}
	MouseMove, 418, 600
	Send, {Lbutton}
	MouseMove, 497, 420
	Send, {Lbutton}
	MouseMove, 418, 600
	Send, {Lbutton}
	Send, {sc12}
}
return
Save:
Gui, submit, NoHide
IniWrite,  %Key1%, %ini%, Hotkeys, Key1
Reload
return


Gui, Submit, NoHide
Hotkey, %Key2%, MyKey2, On, UseErrorLevel
return

MyKey2:
{
	Send, {sc12}
	MouseMove, 468, 510
	Send, {Lbutton}
	MouseMove, 497, 312
	Send, {Lbutton}
	MouseMove, 468, 510
	Send, {Lbutton}
	MouseMove, 468, 535
	Send, {Lbutton}
	MouseMove, 497, 347
	Send, {Lbutton}
	MouseMove, 468, 535
	Send, {Lbutton}
	MouseMove, 468, 570
	Send, {Lbutton}
	MouseMove, 497, 382
	Send, {Lbutton}
	MouseMove, 468, 570
	Send, {Lbutton}
	MouseMove, 468, 600
	Send, {Lbutton}
	MouseMove, 497, 420
	Send, {Lbutton}
	MouseMove, 468, 600
	Send, {Lbutton}
	Send, {sc12}
}
return

Save2:
Gui, submit, NoHide
IniWrite,  %Key2%, %ini%, Hotkeys, Key2
Reload
return
</code></pre></div><p>У меня получилось вот таким вот способом, вроде все работает:<br /></p><div class="codebox"><pre><code>global ini := &quot;IniFile.ini&quot;
ifExist, %ini%
    goto true
else
    goto false

false:
IniWrite, Key, %ini%, Hotkeys, Key1
IniWrite, Key, %ini%, Hotkeys, Key2
goto true

true:
IniRead, Dm, %ini%, Hotkeys, Key1
IniRead, Dm2, %ini%, Hotkeys, Key2





Gui, Font, S16 CGray, Verdana
FileInstall, C:\Users\User\Desktop\1470403006_geroi.png, %A_temp%\1470403006_geroi.png
Gui, Add, Picture, x-38 y-10 w520 h560 , %A_temp%\1470403006_geroi.png
Gui, Add, Text, x22 y10 w210 h30 BackgroundTrans, Введите клавишу.
Gui, Add, Text, x22 y60 w100 h30 BackgroundTrans, Броня
Gui, Add, Text, x282 y60 w100 h30 BackgroundTrans, Баты
Gui, Add, Hotkey, x52 y110 w100 h30 vKey1, %Dm%
Gui, Add, Hotkey, x312 y110 w100 h30 , 
Gui, Add, Text, x2 y110 w30 h30 BackgroundTrans, 1.
Gui, Add, Text, x2 y160 w30 h30 BackgroundTrans, 2
Gui, Add, Hotkey, x52 y160 w100 h30 vKey2, %Dm2%
Gui, Add, Hotkey, x312 y160 w100 h30 , 
Gui, Add, Text, x2 y210 w30 h30 BackgroundTrans, 3.
Gui, Add, Text, x2 y260 w30 h30 BackgroundTrans, 4.
Gui, Add, Hotkey, x312 y210 w100 h30 , 
Gui, Add, Hotkey, x312 y260 w100 h30 , 
Gui, Add, Button, x422 y110 w40 h30 , Ок
Gui, Add, Button, x422 y160 w40 h30 , Ок
Gui, Add, Button, x422 y210 w40 h30 , Ок
Gui, Add, Button, x422 y260 w40 h30 , Ок
Gui, Add, Button, x162 y110 w40 h30 gSave, Ок
Gui, Add, Button, x162 y160 w40 h30 gSave2, Ок
Gui, Show, w478 h438, Броня и баты

Gui, Submit, NoHide
Hotkey, %Key1%, MyKey1, On, UseErrorLevel
Hotkey, %Key2%, MyKey2, On, UseErrorLevel
return
MyKey1: 
{
	Send, {sc12}
	MouseMove, 418, 510 
	Send, {Lbutton}
	MouseMove, 497, 312
	Send, {Lbutton}
	MouseMove, 418, 510
	Send, {Lbutton}
	MouseMove, 418, 535
	Send, {Lbutton}
	MouseMove, 497, 347
	Send, {Lbutton}
	MouseMove, 418, 535
	Send, {Lbutton}
	MouseMove, 418, 570
	Send, {Lbutton}
	MouseMove, 497, 382
	Send, {Lbutton}
	MouseMove, 418, 570
	Send, {Lbutton}
	MouseMove, 418, 600
	Send, {Lbutton}
	MouseMove, 497, 420
	Send, {Lbutton}
	MouseMove, 418, 600
	Send, {Lbutton}
	Send, {sc12}
}
return
Save:
Gui, submit, NoHide
IniWrite,  %Key1%, %ini%, Hotkeys, Key1
Reload
return



MyKey2:
{
	Send, {sc12}
	MouseMove, 468, 510
	Send, {Lbutton}
	MouseMove, 497, 312
	Send, {Lbutton}
	MouseMove, 468, 510
	Send, {Lbutton}
	MouseMove, 468, 535
	Send, {Lbutton}
	MouseMove, 497, 347
	Send, {Lbutton}
	MouseMove, 468, 535
	Send, {Lbutton}
	MouseMove, 468, 570
	Send, {Lbutton}
	MouseMove, 497, 382
	Send, {Lbutton}
	MouseMove, 468, 570
	Send, {Lbutton}
	MouseMove, 468, 600
	Send, {Lbutton}
	MouseMove, 497, 420
	Send, {Lbutton}
	MouseMove, 468, 600
	Send, {Lbutton}
	Send, {sc12}
}
return
Save2:
Gui, submit, NoHide
IniWrite,  %Key2%, %ini%, Hotkeys, Key2
Reload
return




</code></pre></div>]]></content>
			<author>
				<name><![CDATA[aktor311]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38738</uri>
			</author>
			<updated>2017-08-31T13:40:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118991#p118991</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение значения переменной в Ini-файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118989#p118989" />
			<content type="html"><![CDATA[<p><strong>belyankin12</strong><br /></p><div class="codebox"><pre><code>global ini := &quot;IniFile.ini&quot;
ifExist, %ini%
    goto true
else
    goto false

false:
IniWrite, Key, %ini%, Hotkeys, Key1
goto true

true:
IniRead, Dm, %ini%, Hotkeys, Key1

Gui, Add, Picture, x-98 y-100 w600 h850 , C:\Users\User\Desktop\1470403006_geroi.png
Gui, Font, S16 CGray, 
Gui, Add, Text, x22 y10 w190 h30 BackgroundTrans, Введите клавишу.
Gui, Add, Hotkey, x22 y70 w80 h30 vKey1, %Dm%
Gui, Add, Button, x22 y110 w50 h30 gSave, Ок
Gui, Show, w479 h379, Гюи

Gui, Submit, NoHide
Hotkey, %Key1%, MyKey1, On, UseErrorLevel
return

MyKey1:
Send, Hallo
return

Save:
Gui, submit, NoHide
IniWrite,  %Key1%, %ini%, Hotkeys, Key1
Reload
return</code></pre></div><p>Теперь все работает. Спасибо вам большое.</p>]]></content>
			<author>
				<name><![CDATA[aktor311]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38738</uri>
			</author>
			<updated>2017-08-31T13:18:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118989#p118989</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение значения переменной в Ini-файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118987#p118987" />
			<content type="html"><![CDATA[<p>Я же говорил. Нельзя чтобы и выводимая контролом hotkey переменная и переменная, задающая значение hotkey были одинаковыми.</p><div class="codebox"><pre><code>Gui, Add, Hotkey, x22 y70 w80 h30 vKey1, %Dm%

Hotkey, %Key1%, MyKey1, On, UseErrorLevel</code></pre></div><p>Замените ваши строчки на мои. И на метке Save reload вместо msgbox верните.</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2017-08-31T13:08:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118987#p118987</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение значения переменной в Ini-файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118986#p118986" />
			<content type="html"><![CDATA[<p><strong>belyankin12</strong><br />Готово<br /></p><div class="codebox"><pre><code>global ini := &quot;IniFile.ini&quot;
ifExist, %ini%
    goto true
else
    goto false

false:
IniWrite, Key, %ini%, Hotkeys, Key1
goto true

true:
IniRead, Dm, %ini%, Hotkeys, Key1

Gui, Add, Picture, x-98 y-100 w600 h850 , C:\Users\User\Desktop\1470403006_geroi.png
Gui, Font, S16 CGray, 
Gui, Add, Text, x22 y10 w190 h30 BackgroundTrans, Введите клавишу.
Gui, Add, Hotkey, x22 y70 w80 h30 vDm ,  %Dm%
Gui, Add, Button, x22 y110 w50 h30 gSave, Ок
Gui, Show, w479 h379, Гюи

Gui, Submit, NoHide
Hotkey, %Dm%, MyKey1, On, UseErrorLevel
return

MyKey1:
Send, Hallo
return

Save:
Gui, submit, NoHide
IniWrite, %Dm%, %ini%, Hotkeys, Key1
MsgBox, работает
return
</code></pre></div><p>Но MyKey1 не работает, т.е. При установке в хоткей, например 1, нажмаю на кнопку Ок. И при нажатие на 1 просто ставится 1.<br />Т.е. эта строка не работает:<br /></p><div class="codebox"><pre><code>MyKey1:
Send, Hallo
return</code></pre></div><p>Где я ошибся?<br />Можете попробовать запустить код у себя и сразу поймете.</p>]]></content>
			<author>
				<name><![CDATA[aktor311]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38738</uri>
			</author>
			<updated>2017-08-31T13:02:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118986#p118986</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение значения переменной в Ini-файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118985#p118985" />
			<content type="html"><![CDATA[<p>Остался последний штрих. Заметили что при загрузке скрипта хоткей изначально пуст, но мы ведь сохраняли все во внешний ини так? Так почему же это так? А все потому, что у вас не хватает в контроле переменной. Исправьте:<br /></p><div class="codebox"><pre><code>Gui, Add, Hotkey, x22 y70 w80 h30 vFirsted, %Firsted%</code></pre></div><p>И да, лучше бы вам поменять названия переменных. То есть либо в iniRead выводите переменную с другим именем, либо в hotkey имя переменной поменяйте.</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2017-08-31T12:38:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118985#p118985</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение значения переменной в Ini-файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118984#p118984" />
			<content type="html"><![CDATA[<p>Сделал все как вы сказали<br /></p><div class="codebox"><pre><code>global ini := &quot;IniFile.ini&quot;
ifExist, %ini%
    goto true
else
    goto false

false:
IniWrite, Key, %ini%, Hotkeys, Key1
goto true

true:
IniRead, Firsted, %ini%, Hotkeys, Key1

Gui, Add, Picture, x-98 y-100 w600 h850 , C:\Users\User\Desktop\1470403006_geroi.png
Gui, Font, S16 CGray, 
Gui, Add, Text, x22 y10 w190 h30 BackgroundTrans, Введите клавишу.
Gui, Add, Hotkey, x22 y70 w80 h30 vFirsted , 
Gui, Add, Button, x22 y110 w50 h30 gSave, Ок
Gui, Show, w479 h379, Гюи

Gui, Submit, NoHide
Hotkey, %Firsted%, MyKey1, On, UseErrorLevel
return

MyKey1:
Send, Hallo
return

Save:
Gui, submit, NoHide
IniWrite, %Firsted%, %ini%, Hotkeys, Key1
MsgBox, работает
return
</code></pre></div><p>Есть ли где нибудь ошибки?<br />Потому что кнопка и правда работает все в ини меняется. Но не работает MyKey1: Send, Hallo&nbsp; &nbsp; &nbsp; &nbsp; return</p>]]></content>
			<author>
				<name><![CDATA[aktor311]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38738</uri>
			</author>
			<updated>2017-08-31T12:15:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118984#p118984</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение значения переменной в Ini-файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118983#p118983" />
			<content type="html"><![CDATA[<p>Нет. У вас Save стоит, нужно к ней привязать кнопку. Запустите этот код, простой пример:<br /></p><div class="codebox"><pre><code>Gui, Add, Button, x22 y110 w50 h30 gSave, Save
Gui, Add, Button, x22 y110 w300 h30 g123, Ok
Gui, Show, w479 h379,
return

Save:
msgbox, Вы нажали кнопку Save
return

123:
msgbox, Вы нажали кнопку Ок
return</code></pre></div><p>А теперь сделайте уже наконец кнопку сохранения. И уберите три первые строчки скрипта. Вы либо слушайте мои советы, либо слушайте советы Мандаринки, не нужно наши коды склеивать, они абсолютно разные.</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2017-08-31T11:53:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118983#p118983</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение значения переменной в Ini-файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118982#p118982" />
			<content type="html"><![CDATA[<p><strong>belyankin12</strong><br />Вот нынешний код:<br /></p><div class="codebox"><pre><code>PathIni = IniFile.ini
IniRead, Firsted, % PathIni, Section, Firsted, % A_Space
Hotkey, %Firsted%, MyKey1, On, UseErrorLevel

global ini := &quot;IniFile.ini&quot;

ifExist, %ini%
    goto true
else
    goto false

false:
IniWrite, Key, %ini%, Hotkeys, Key1

goto true

true:
IniRead, Firsted, %ini%, Hotkeys, Key1


Gui, Add, Picture, x-98 y-100 w600 h850 , C:\Users\User\Desktop\1470403006_geroi.png
Gui, Font, S16 CGray, 
Gui, Add, Text, x22 y10 w190 h30 BackgroundTrans, Введите клавишу.
Gui, Add, Hotkey, x22 y70 w80 h30 vFirsted gSave, 
Gui, Add, Button, x22 y110 w50 h30 , Ок
Gui, Show, w479 h379, Untitled GUI




Gui, Submit, NoHide
Hotkey, %Firsted%, MyKey1, On, UseErrorLevel
return


Button:
GuiControlGet, guiHotKey

Return



MyKey1:
Send, ли
return

Save:
Gui, submit, NoHide
IniWrite, %Firsted%, %ini%, Hotkeys, Key1
return
</code></pre></div><p>Что нужно с кнопкой делать? К хоткею как то привязывать?<br /></p><div class="codebox"><pre><code>Hotkey,%Firsted%, MyKey1, Off, UseErrorLevel
Hotkey, %Firsted%, MyKey1, On, UseErrorLevel
Return</code></pre></div><p>Что то типо этого?</p>]]></content>
			<author>
				<name><![CDATA[aktor311]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38738</uri>
			</author>
			<updated>2017-08-31T11:40:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118982#p118982</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение значения переменной в Ini-файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118978#p118978" />
			<content type="html"><![CDATA[<p>Ну вот почти. Осталось поставить return после назначения hotkey на метку и после key1 return нужен. Key1 на MyKey1 нужно поменять. А вот кнопку так и не сделали, вас не смущает, что если нажать на кнопку Ок, ничего абсолютно не произойдет? А про оптимальные или нет я говорил не вам, я говорил тому, кто решил вам помочь, создав кучу костылей.</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2017-08-31T09:22:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118978#p118978</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение значения переменной в Ini-файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118975#p118975" />
			<content type="html"><![CDATA[<p><strong>belyankin12</strong><br />Так?<br /></p><div class="codebox"><pre><code>PathIni = IniFile.ini
IniRead, Firsted, % PathIni, Section, Firsted, % A_Space
Hotkey, %Firsted%, MyKey1, On, UseErrorLevel

global ini := &quot;IniFile.ini&quot;

ifExist, %ini%
    goto true
else
    goto false

false:
IniWrite, Key, %ini%, Hotkeys, Key1

goto true

true:
IniRead, Firsted, %ini%, Hotkeys, Key1


Gui, Add, Picture, x-98 y-100 w600 h850 , C:\Users\User\Desktop\1470403006_geroi.png
Gui, Font, S16 CGray, 
Gui, Add, Text, x22 y10 w190 h30 BackgroundTrans, Введите клавишу.
Gui, Add, Hotkey, x22 y70 w80 h30 vFirsted gSave, 
Gui, Add, Button, x22 y110 w50 h30 , Ок
Gui, Show, w479 h379, Untitled GUI




Gui, Submit, NoHide
Hotkey, %Firsted%, MyKey1, On, UseErrorLevel



Key1:
Send, ли

Save:
Gui, submit, NoHide
IniWrite, %Firsted%, %ini%, Hotkeys, Key1
return</code></pre></div><p>И тут разве не Key или Key1 надо? Просто в ini такая запись<br />[Hotkeys]<br />Key1=2<br />Вот я и подумал что тут надо либо Key1 либо то что было вместо 2 а это Key.<br />Я понимаю что мои способы не оптимальны. Но по причине того что я еще &quot;чайник&quot; я использую лишь то что знаю и могу.<br />Если бы я знал более оптимальные способы я бы использовал именно их. Лучше учиться на своих ошибках чем сидеть боясь что то сделать неправильно.</p>]]></content>
			<author>
				<name><![CDATA[aktor311]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38738</uri>
			</author>
			<updated>2017-08-31T06:53:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118975#p118975</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение значения переменной в Ini-файл]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118974#p118974" />
			<content type="html"><![CDATA[<p>А если у пользователя будет примерно 50 клавиш, на все условия поставите? В вашем коде слишком много лишних движений, есть способы попроще.</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2017-08-31T06:53:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118974#p118974</id>
		</entry>
</feed>
