<?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=6786&amp;type=atom" />
	<updated>2012-02-08T23:13:50Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=6786</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56585#p56585" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>creature.ws пишет:</cite><blockquote><p>...вообще идеальный вариант</p></blockquote></div><p>Полноценный код <em>в студию</em>!</p>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2012-02-08T23:13:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56585#p56585</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56556#p56556" />
			<content type="html"><![CDATA[<p>В точку! Огромное спасибо <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Мпэт]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27572</uri>
			</author>
			<updated>2012-02-07T21:32:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56556#p56556</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56555#p56555" />
			<content type="html"><![CDATA[<p>А выше вообще идеальный вариант <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-02-07T21:26:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56555#p56555</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56554#p56554" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>i:=0, varname:=&quot;x,y,m,r,l,ch&quot;

#F1::
label1:
   Loop, Parse, varname, CSV
      Gui, Add, Text,, % &quot;Параметр &quot;A_LoopField &quot;:&quot;
   Loop, Parse, varname, CSV
      Gui, Add, Edit, % (A_Index=1 ? &quot;ym&quot;:&quot;&quot;)&quot; v&quot;A_LoopField
   Gui, Add, Button, Default, Принять
   Gui, Show,, Ввод данных
   Return

ButtonПринять:
   Gui, Submit
   SendRaw, % &quot;`nL&quot;++i &quot;:&quot;
   Loop, Parse, varname, CSV
   {
      GuiControlGet, varvalue,, % A_LoopField
      varvalue:=RegExMatch(varvalue, &quot;\D&quot;) ? &quot;&quot;&quot;&quot;varvalue &quot;&quot;&quot;&quot;:varvalue
      SendRaw, % &quot;`n`t&quot;A_LoopField &quot;:=&quot;(!varvalue ? 0:varvalue)
   }
   SendRaw, `n`tReturn`n`n
GuiClose:
   IsClose:=!A_GuiControl ? True:False
   Gui, Destroy
   Goto, % &quot;label&quot;(IsClose ? &quot;2&quot;:&quot;1&quot;)
label2:
   i:=0
   Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2012-02-07T21:25:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56554#p56554</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56553#p56553" />
			<content type="html"><![CDATA[<p>Вероятно, после <strong>Gui, Submit</strong> следует добавить очистку полей ввода.<br /><a href="http://l.autohotkey.net/docs/commands/GuiControl.htm">GuiControl</a>.</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-02-07T21:25:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56553#p56553</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56552#p56552" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>creature.ws пишет:</cite><blockquote><p>Вероятно, так <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p></blockquote></div><p>Спасибо! Работает теперь.<br />А как сделать, чтоб когда окно для ввода открывается в последующие разы не сохраняло предыдущие данные?<br />Ато получается так:<br />Открылось окно(строки пустые), ввёл данные, нажал на кнопку, пропечаталось, открылось окно(строки с предыдущими данными).<br />Просто не удобно постоянно удалять.</p>]]></content>
			<author>
				<name><![CDATA[Мпэт]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27572</uri>
			</author>
			<updated>2012-02-07T21:22:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56552#p56552</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56551#p56551" />
			<content type="html"><![CDATA[<p>Вероятно, так <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /></p><div class="codebox"><pre><code>Gui, Add, Text,, Параметр x:
Gui, Add, Text,, Параметр y:
Gui, Add, Text,, Параметр m:
Gui, Add, Text,, Параметр r:
Gui, Add, Text,, Параметр l:
Gui, Add, Text,, Параметр ch:
Gui, Add, Edit, vx ym ; Опция ym начинает новую колонку элементов управления.
Gui, Add, Edit, vy
Gui, Add, Edit, vm
Gui, Add, Edit, vr
Gui, Add, Edit, vl
Gui, Add, Edit, vch 
Gui, Add, Button, default, Принять ; ButtonПринять (если она есть) будет запущена при нажатии кнопки.

#F1::
i:=0
label1:
i:=i+1
Gui, Show,, Ввод данных
return ; Окончание секции авто-выполнения. Скрипт ожидает каких-нибудь действий пользователя.
GuiClose:
ButtonПринять:
Gui, Submit ; Сохраняем входные данные пользователя в ассоциированной переменной элемента управления.
if (x=&quot;&quot;)
    {
    x:=0
    }
if (y=&quot;&quot;)
    {
    y:=0
    }
if (m=&quot;&quot;)
    {
    m:=0
    }
if (r=&quot;&quot;)
    {
    r:=0
    }
if (l=&quot;&quot;)
    {
    l:=0
    }
if (ch=&quot;&quot;)
    {
    ch:=0
    }
 
Send,{Enter}L%i%:{Enter}{tab}x:=%x%{Enter}{tab}y:=%y%{Enter}{tab}m:=%m%{Enter}{tab}r:=%r%{Enter}{tab}l:=%l%{Enter}{tab}ch:=%ch%{Enter}{tab}Return{Enter}{Enter}
 
goto, label1
 
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-02-07T21:12:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56551#p56551</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56550#p56550" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>creature.ws пишет:</cite><blockquote><p>Нужно вынести добавление элементов GUI за пределы метки label1</p></blockquote></div><p>Не подскажешь как? Я только начинаю ковыряться со скриптами.<br />Если я спущу Label1 ниже GUI, тогда он не будет выдавать окошко повторно, а сразу будет печатать, печатать и печатать.</p>]]></content>
			<author>
				<name><![CDATA[Мпэт]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27572</uri>
			</author>
			<updated>2012-02-07T21:07:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56550#p56550</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56548#p56548" />
			<content type="html"><![CDATA[<p>Нужно вынести добавление элементов GUI за пределы метки label1</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-02-07T21:02:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56548#p56548</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Удаление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56547#p56547" />
			<content type="html"><![CDATA[<p>Здравствуйте.<br />Столкнулся вот с такой проблемкой.<br />Пытаюсь создать скрипт для создания скриптов одного типа.<br /></p><div class="codebox"><pre><code>
#F1::
i:=0
label1:
i:=i+1
Gui, Add, Text,, Параметр x:
Gui, Add, Text,, Параметр y:
Gui, Add, Text,, Параметр m:
Gui, Add, Text,, Параметр r:
Gui, Add, Text,, Параметр l:
Gui, Add, Text,, Параметр ch:
Gui, Add, Edit, vx ym ; Опция ym начинает новую колонку элементов управления.
Gui, Add, Edit, vy
Gui, Add, Edit, vm
Gui, Add, Edit, vr
Gui, Add, Edit, vl
Gui, Add, Edit, vch 
Gui, Add, Button, default, Принять ; ButtonПринять (если она есть) будет запущена при нажатии кнопки.
Gui, Show,, Ввод данных
return ; Окончание секции авто-выполнения. Скрипт ожидает каких-нибудь действий пользователя.
GuiClose:
ButtonПринять:
Gui, Submit ; Сохраняем входные данные пользователя в ассоциированной переменной элемента управления.
if (x=&quot;&quot;)
	{
	x:=0
	}
if (y=&quot;&quot;)
	{
	y:=0
	}
if (m=&quot;&quot;)
	{
	m:=0
	}
if (r=&quot;&quot;)
	{
	r:=0
	}
if (l=&quot;&quot;)
	{
	l:=0
	}
if (ch=&quot;&quot;)
	{
	ch:=0
	}

Send,{Enter}L%i%:{Enter}{tab}x:=%x%{Enter}{tab}y:=%y%{Enter}{tab}m:=%m%{Enter}{tab}r:=%r%{Enter}{tab}l:=%l%{Enter}{tab}ch:=%ch%{Enter}{tab}Return{Enter}{Enter}

goto, label1

Return</code></pre></div><p>При нажатии на WIN+F1 выскакивает окошко в которое нужно внести параметры(цифры) и после нажатия кнопки &quot;Принять&quot;, скрипт прописывает:</p><div class="codebox"><pre><code>L1:
	x:=1
	y:=2
	m:=3
	r:=4
	l:=5
	ch:=6
	Return</code></pre></div><p>После этого скрипт должен снова выкидывать окошко для ввода данных, но он выдаёт ошибку в строке <br /></p><div class="codebox"><pre><code>Gui, Add, Edit, vx ym ; Опция ym начинает новую колонку элементов управления.</code></pre></div><p>Ибо как я понял он не может создать новую переменную х(ну и последующие соответственно), т.к. она уже существует.<br />Подскажите как решить эту проблемку?<br />Заранее благодарен!</p>]]></content>
			<author>
				<name><![CDATA[Мпэт]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27572</uri>
			</author>
			<updated>2012-02-07T20:37:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56547#p56547</id>
		</entry>
</feed>
