<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Переменные x2]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=9147&amp;type=atom" />
	<updated>2014-01-13T19:01:01Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=9147</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переменные x2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79181#p79181" />
			<content type="html"><![CDATA[<p>Большое спасибо, но меня мучает вопрос, как поместить 3 переменных в одну? <strong>% Edit%A_Index%</strong> тут 2 переменные нормально без ошибки, но как мне еще переменную <strong>a%A_Index%</strong> объединить с <strong>%Edit%</strong>?</p>]]></content>
			<author>
				<name><![CDATA[Qweasd123]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31279</uri>
			</author>
			<updated>2014-01-13T19:01:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79181#p79181</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переменные x2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79180#p79180" />
			<content type="html"><![CDATA[<p>Это 2 строки:<br /></p><div class="codebox"><pre><code>
I := A_Index = EditCount ? 1 : A_Index+ 1
arr%A_Index% := a%I%
</code></pre></div><p>Вначале вычисляем I. Если A_Index= EditCount&nbsp; то&nbsp; I = 1, или = A_Index + 1.<br />Далее заносим в новый псевдо массив<br /></p><div class="codebox"><pre><code>arr%A_Index% := a%I%</code></pre></div><p>например: arr1 := a2. <br />Если A_Index = 5, то arr5 = a1.</p><p>Вообщем если для вас это сложно, то надо посидеть, и подумать. Задайте вопрос ещё раз позже, и детальнее, если ещё будет интересно. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-01-13T18:56:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79180#p79180</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переменные x2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79179#p79179" />
			<content type="html"><![CDATA[<p>Объясните пожалуйста подробно эту строчку</p><p> I := A_Index = EditCount ? 1 : A_Index+ 1, arr%A_Index% := a%I%</p>]]></content>
			<author>
				<name><![CDATA[Qweasd123]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31279</uri>
			</author>
			<updated>2014-01-13T18:40:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79179#p79179</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переменные x2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79176#p79176" />
			<content type="html"><![CDATA[<p>Можно и:<br /></p><div class="codebox"><pre><code>
EditCount := 5

Loop % EditCount
    Gui Add, Edit, vEdit%A_Index% x+5
 
Gui, Add, UpDown, -16 hp wp xs vUpDown gUpDown Range0-1 Horz
Gui show   

Loop % EditCount
    a%A_Index% := A_Index 
    
Loop % EditCount
    GuiControl,, Edit%A_Index%, % a%A_Index%  
Return
  

UpDown:   
    If UpDown 
    
    Loop % EditCount 
        I := A_Index = 1 ? EditCount : A_Index - 1, arr%A_Index% := a%I% 
        
    Else 
    
    Loop % EditCount 
        I := A_Index = EditCount ? 1 : A_Index + 1, arr%A_Index% := a%I% 
        
    Loop % EditCount  
        GuiControl,, Edit%A_Index%, % a%A_Index% := arr%A_Index% 
    Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-01-13T18:29:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79176#p79176</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переменные x2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79175#p79175" />
			<content type="html"><![CDATA[<p>Все второй код увидел! Спасибо тебе большое, как всегда на высшем уровне!</p>]]></content>
			<author>
				<name><![CDATA[Qweasd123]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31279</uri>
			</author>
			<updated>2014-01-13T18:28:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79175#p79175</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переменные x2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79174#p79174" />
			<content type="html"><![CDATA[<p>Да, спасибо! Только подскажи как направление тут изменить, у тебя снизу вверх, а например справа на лево и т.д?</p>]]></content>
			<author>
				<name><![CDATA[Qweasd123]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31279</uri>
			</author>
			<updated>2014-01-13T18:27:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79174#p79174</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переменные x2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79173#p79173" />
			<content type="html"><![CDATA[<p>Так?<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>
EditCount := 15

Loop % EditCount
    Gui Add, Edit, vEdit%A_Index%
    
Gui, Add, Button, gButton, Button
Gui show   

Loop % EditCount
    a%A_Index% := A_Index*2
    
Loop % EditCount
    GuiControl,, Edit%A_Index%, % a%A_Index%  
Return
  
Button:   
    Loop % EditCount 
        I := A_Index = EditCount ? 1 : A_Index + 1, arr%A_Index% := a%I% 
    
    Loop % EditCount  
        GuiControl,, Edit%A_Index%, % a%A_Index% := arr%A_Index% 
    Return
</code></pre></div></div></div><p>Точнее:<br /></p><div class="codebox"><pre><code>
EditCount := 5

Loop % EditCount
    Gui Add, Edit, vEdit%A_Index% x+5
    
Gui, Add, Button, gButton xs, Button
Gui show   

Loop % EditCount
    a%A_Index% := A_Index 
    
Loop % EditCount
    GuiControl,, Edit%A_Index%, % a%A_Index%  
Return
  
Button:   
    Loop % EditCount 
        I := A_Index = EditCount ? 1 : A_Index + 1, arr%A_Index% := a%I% 
    
    Loop % EditCount  
        GuiControl,, Edit%A_Index%, % a%A_Index% := arr%A_Index% 
    Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-01-13T18:20:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79173#p79173</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переменные x2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79172#p79172" />
			<content type="html"><![CDATA[<p>Сама суть программы, я ввожу разные числа в определенное количество полей для ввода Edit, далее нажимаю на кнопку и все значения сдвигаются вправо. Например я ввел числа 1-2-3-4-5 , нажимаю на кнопку и числа стали <br />2-3-4-5-1, таких чисел и 10. Вот мне нужно и цикл взять за основу чтобы не расписывать все</p>]]></content>
			<author>
				<name><![CDATA[Qweasd123]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31279</uri>
			</author>
			<updated>2014-01-13T17:22:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79172#p79172</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переменные x2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79171#p79171" />
			<content type="html"><![CDATA[<p>Так?<br /></p><div class="codebox"><pre><code>
Loop 3
    Gui Add, Edit, vEdit%A_Index%
Gui show  
Sleep 1001
Loop 3 
    a%A_Index% := A_Index+3
Loop 3 
    GuiControl,, Edit%A_Index%, % Itog%A_Index% := a%A_Index% 
Sleep 1001
Loop 3     
    MsgBox % Itog%A_Index%
Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-01-13T17:22:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79171#p79171</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переменные x2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79170#p79170" />
			<content type="html"><![CDATA[<p>Непонимаю?<br /></p><div class="codebox"><pre><code>
Loop 3
    Gui Add, Edit, vEdit%A_Index%
Gui show  
Sleep 1001
Loop 3 
    a%A_Index% := A_Index+3
Loop 3 
    GuiControl,, Edit%A_Index%, % a%A_Index% 
Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-01-13T17:20:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79170#p79170</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переменные x2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79169#p79169" />
			<content type="html"><![CDATA[<p>Число которые мы ввели в другое поле Edit.</p>]]></content>
			<author>
				<name><![CDATA[Qweasd123]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31279</uri>
			</author>
			<updated>2014-01-13T17:19:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79169#p79169</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переменные x2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79168#p79168" />
			<content type="html"><![CDATA[<p>И что тут значит Itog?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-01-13T17:18:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79168#p79168</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переменные x2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79166#p79166" />
			<content type="html"><![CDATA[<p>Вот полная часть где мне нужен A_Index</p><div class="codebox"><pre><code>Loop %
{
a%A_Index%:= 3+A_Index
}</code></pre></div><p>Далее мне нужно вставить в поле Edit это значение</p><div class="codebox"><pre><code>GuiControl,, Edit, % Itog%a1%
GuiControl,, Edit2, % Itog%a2%
GuiControl,, Edit3, % Itog%a2%</code></pre></div><p>Проблема в том что вставлять мне нужно уйму раз и чтобы не писать 1000 строк мне нужно внедрить A_Index</p><p>Я делаю вот так Itog%a%A_Index%, в общем как бы три переменных в одной, 1 - %A_Index% , 2- %a%, 3 - %Itog%, мне нужно их собрать в одну</p>]]></content>
			<author>
				<name><![CDATA[Qweasd123]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31279</uri>
			</author>
			<updated>2014-01-13T17:10:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79166#p79166</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переменные x2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79165#p79165" />
			<content type="html"><![CDATA[<p>У меня вообще подозрения, на нечто более лютое:<br /></p><div class="codebox"><pre><code>
a6 = шест  
a7 = седьм 

Loop 2
    index := A_Index+5
    , namevar := &quot;a&quot; index
    , b%namevar% := a%index% &quot;ое&quot;
    
MsgBox % ba6
MsgBox % ba7
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-01-13T17:06:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79165#p79165</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переменные x2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=79164#p79164" />
			<content type="html"><![CDATA[<p>Не знаю, что вы пытаетесь сделать, но возможно так:<br /></p><div class="codebox"><pre><code>loop 10
{
  tmp:=a%A_Index%
  B%tmp%     ; что бы это ни значило...
}</code></pre></div><p>Или, возможно вы пытаетесь записать в массив &quot;B&quot; содержимое массива &quot;A&quot;?<br /></p><div class="codebox"><pre><code>loop 10
  B%A_Index%:= a%A_Index%
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2014-01-13T17:01:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=79164#p79164</id>
		</entry>
</feed>
