<?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=6786</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=6786&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Удаление переменной».]]></description>
		<lastBuildDate>Wed, 08 Feb 2012 23:13:50 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=56585#p56585</link>
			<description><![CDATA[<div class="quotebox"><cite>creature.ws пишет:</cite><blockquote><p>...вообще идеальный вариант</p></blockquote></div><p>Полноценный код <em>в студию</em>!</p>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Wed, 08 Feb 2012 23:13:50 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=56585#p56585</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=56556#p56556</link>
			<description><![CDATA[<p>В точку! Огромное спасибо <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (Мпэт)]]></author>
			<pubDate>Tue, 07 Feb 2012 21:32:13 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=56556#p56556</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=56555#p56555</link>
			<description><![CDATA[<p>А выше вообще идеальный вариант <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (creature.ws)]]></author>
			<pubDate>Tue, 07 Feb 2012 21:26:35 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=56555#p56555</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=56554#p56554</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Tue, 07 Feb 2012 21:25:15 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=56554#p56554</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=56553#p56553</link>
			<description><![CDATA[<p>Вероятно, после <strong>Gui, Submit</strong> следует добавить очистку полей ввода.<br /><a href="http://l.autohotkey.net/docs/commands/GuiControl.htm">GuiControl</a>.</p>]]></description>
			<author><![CDATA[null@example.com (creature.ws)]]></author>
			<pubDate>Tue, 07 Feb 2012 21:25:10 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=56553#p56553</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=56552#p56552</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (Мпэт)]]></author>
			<pubDate>Tue, 07 Feb 2012 21:22:33 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=56552#p56552</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=56551#p56551</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (creature.ws)]]></author>
			<pubDate>Tue, 07 Feb 2012 21:12:32 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=56551#p56551</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=56550#p56550</link>
			<description><![CDATA[<div class="quotebox"><cite>creature.ws пишет:</cite><blockquote><p>Нужно вынести добавление элементов GUI за пределы метки label1</p></blockquote></div><p>Не подскажешь как? Я только начинаю ковыряться со скриптами.<br />Если я спущу Label1 ниже GUI, тогда он не будет выдавать окошко повторно, а сразу будет печатать, печатать и печатать.</p>]]></description>
			<author><![CDATA[null@example.com (Мпэт)]]></author>
			<pubDate>Tue, 07 Feb 2012 21:07:55 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=56550#p56550</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Удаление переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=56548#p56548</link>
			<description><![CDATA[<p>Нужно вынести добавление элементов GUI за пределы метки label1</p>]]></description>
			<author><![CDATA[null@example.com (creature.ws)]]></author>
			<pubDate>Tue, 07 Feb 2012 21:02:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=56548#p56548</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Удаление переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=56547#p56547</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (Мпэт)]]></author>
			<pubDate>Tue, 07 Feb 2012 20:37:17 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=56547#p56547</guid>
		</item>
	</channel>
</rss>
