<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK:Сохранение переменной в конфигурационный файл]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=7714</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=7714&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK:Сохранение переменной в конфигурационный файл».]]></description>
		<lastBuildDate>Sun, 21 Oct 2012 09:03:33 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK:Сохранение переменной в конфигурационный файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=64939#p64939</link>
			<description><![CDATA[<div class="codebox"><pre><code>Loop, 2
   IniRead, Input_%A_Index%
          , % A_ScriptDir &quot;\&quot;SubStr(A_ScriptName, 1, -4)&quot;.ini&quot;
          , Set
          , Input_%A_Index%
          , % A_Index=1 ? &quot;temporary empty field&quot;:&quot;&quot;

Gui, Add, Edit, vInput_1 x+10 w200 h18, % Input_1
Gui, Add, Hotkey, vInput_2 x+15 w45, % Input_2
Gui, Add, Button, x10 y40, Save

ShowGUI:
   Hotkey, Ctrl &amp; Enter, ShowGUI, Off ; call GUI hotkey
   If % Input_2&lt;&gt;&quot;ERROR&quot;
      Hotkey, % &quot;$&quot;Input_2, InputText, Off
   Gui, Show,, Test
   Return

ButtonSave:
   Gui, Submit
   Gui, Hide
   Loop, 2
      If !Input_%A_Index%
      {
         MsgBox, 262160, % &quot;field: &quot;A_Index, % &quot;make input!&quot;, 1
         Goto, ShowGUI
      }
   Loop, 2
      IniWrite, % Input_%A_Index%
              , % A_ScriptDir &quot;\&quot;SubStr(A_ScriptName, 1, -4)&quot;.ini&quot;
              , Set
              , Input_%A_Index%
   Hotkey, Ctrl &amp; Enter, ShowGUI, On
   Hotkey, % &quot;$&quot;Input_2, InputText, On
   Return

InputText:
   SendInput, % &quot;{Raw}&quot;Input_1
   Return

GuiClose:
   ExitApp</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Sun, 21 Oct 2012 09:03:33 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=64939#p64939</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK:Сохранение переменной в конфигурационный файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=64930#p64930</link>
			<description><![CDATA[<p><strong>Grey</strong>, благодарю, еще один нюанс, как вывести текст по нажатию клавиши из переменных в sendinput?</p>]]></description>
			<author><![CDATA[null@example.com ([CM]White)]]></author>
			<pubDate>Sun, 21 Oct 2012 03:01:01 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=64930#p64930</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK:Сохранение переменной в конфигурационный файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=64897#p64897</link>
			<description><![CDATA[<div class="codebox"><pre><code>Loop, 2
   IniRead, Input_%A_Index%
          , % A_ScriptDir &quot;\&quot;SubStr(A_ScriptName, 1, -4)&quot;.ini&quot;
          , Set
          , Input_%A_Index%
          , % A_Index=1 ? &quot;temporary empty field&quot;:&quot;&quot;

BuildGUI:
   ;Gui, Add, Picture, xm y+10
   Gui, Add, Edit, vInput_1 x+10 w200 h18, % Input_1
   Gui, Add, Hotkey, vInput_2 x+15 w45, % Input_2
   Gui, Add, Button, x10 y40, Save
   Gui, Show,, Test
   Return

ButtonSave:
   Gui, Submit
   Gui, Destroy
   Loop, 2
      If !Input_%A_Index%
      {
         MsgBox, 262160,, % &quot;make input! (field: &quot;A_Index &quot;)&quot;, 1
         Goto, BuildGUI
      }
   Loop, 2
      IniWrite, % Input_%A_Index%
              , % A_ScriptDir &quot;\&quot;SubStr(A_ScriptName, 1, -4)&quot;.ini&quot;
              , Set
              , Input_%A_Index%
   ExitApp

GuiClose:
   ExitApp</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Sat, 20 Oct 2012 16:18:56 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=64897#p64897</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK:Сохранение переменной в конфигурационный файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=64890#p64890</link>
			<description><![CDATA[<p><span class="postimg"><img src="http://s2.ipicture.ru/uploads/20121020/Hk82R9bR.jpg" alt="http://s2.ipicture.ru/uploads/20121020/Hk82R9bR.jpg" /></span><br />Нужно сохранить значения переменных обоих полей в конфигурационный файл, но у меня с этим накладочка произошла <br /></p><div class="codebox"><pre><code>Gui,Add,Picture ,xm y+10 
Gui,Add,Edit,vText1 x+10 w200 h18 
Gui,Add,Hotkey,vmyhotkey1 x+15 w45
Gui,Add, Button, x10 y40 , Save
Gui,Show,c000000,Тест
Return

ButtonSave:
IfNotExist, Тест.ini ; Если файла ini не находит - создает, с днфолтными параметрами
{
FileAppend, [Тест] 
IniWrite, %myhotkey1%, %A_ScriptDir%\тест.ini, Options, vmyhotkey1
}
   GuiControlGet, myhotkey1,, myhotkey1
   GuiControlGet, Text1,, Text1
   Gui, Destroy
   Hotkey, $%myhotkey1%, textdown1, On
   Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com ([CM]White)]]></author>
			<pubDate>Sat, 20 Oct 2012 13:49:57 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=64890#p64890</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK:Сохранение переменной в конфигурационный файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=64883#p64883</link>
			<description><![CDATA[<p>Кусок ссылки на раздел статьи содержащий ответ : <a href="http://l.autohotkey.net/docs/commands/Gui.htm#Sub">Gui, Submit</a></p>]]></description>
			<author><![CDATA[null@example.com (creature.ws)]]></author>
			<pubDate>Sat, 20 Oct 2012 11:08:47 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=64883#p64883</guid>
		</item>
		<item>
			<title><![CDATA[AHK:Сохранение переменной в конфигурационный файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=64879#p64879</link>
			<description><![CDATA[<p>Возникла проблема при сохранении/считывании переменных, кусок скрипта<br /></p><div class="codebox"><pre><code>Gui,Add,Edit,vText1 x+10 w200 h18 
Gui,Add,Hotkey,vmyhotkey1 x+15 w45
Gui,Add, Button, x10 y50 , Save</code></pre></div>]]></description>
			<author><![CDATA[null@example.com ([CM]White)]]></author>
			<pubDate>Sat, 20 Oct 2012 10:55:05 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=64879#p64879</guid>
		</item>
	</channel>
</rss>
