<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Разделение 1 переменной на несколько]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12669&amp;type=atom" />
	<updated>2017-05-11T14:12:13Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12669</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Разделение 1 переменной на несколько]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115793#p115793" />
			<content type="html"><![CDATA[<p><strong>Alectric</strong>, <strong>stealzy</strong>, пора прекращать оффтопить.</p>]]></content>
			<author>
				<name><![CDATA[JSmаn]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24434</uri>
			</author>
			<updated>2017-05-11T14:12:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115793#p115793</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Разделение 1 переменной на несколько]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115791#p115791" />
			<content type="html"><![CDATA[<p><strong>Off:</strong><br />Каждому своё. Многие любят &quot;гвозди стаместкой забивать&quot;. Да и вообще все эти компьютерные технологии...</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2017-05-11T13:22:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115791#p115791</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Разделение 1 переменной на несколько]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115780#p115780" />
			<content type="html"><![CDATA[<p>Ну просто не любитель гвозди стаместкой забивать. Тем более когда молоток под рукой.<br />КМК, код без RegEx проще для понимания и маштабирования.</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-05-11T07:26:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115780#p115780</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Разделение 1 переменной на несколько]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115779#p115779" />
			<content type="html"><![CDATA[<p><strong>Off:</strong><br /><strong>stealzy</strong>, чего эт ты так протестуешь то? Не хочешь об этом поговорить?</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2017-05-11T02:03:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115779#p115779</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Разделение 1 переменной на несколько]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115778#p115778" />
			<content type="html"><![CDATA[<p>Функцией:<br /></p><div class="codebox"><pre><code>varsString := &quot;1♦45♦Hello world!♦4♦95&quot;
varArr := ParseString♦(varsString)
MsgBox % varArr[3]

ParseString♦(super_string) {
	arr := []
	Loop parse, super_string, ♦
		arr[A_Index] := A_LoopField
	Return arr
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-05-10T19:30:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115778#p115778</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Разделение 1 переменной на несколько]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115777#p115777" />
			<content type="html"><![CDATA[<p>И тут вы со своими регекспами. Тут они абсолютно не нужны.<br /></p><div class="codebox"><pre><code>var := [], varsString := &quot;1♦45♦33♦4♦95&quot;
Loop parse, varsString, ♦
	var[A_Index] := A_LoopField

MsgBox % var[3]</code></pre></div>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-05-10T19:23:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115777#p115777</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Разделение 1 переменной на несколько]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115775#p115775" />
			<content type="html"><![CDATA[<p>Да вроде больше ничего.</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2017-05-10T16:14:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115775#p115775</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Разделение 1 переменной на несколько]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115773#p115773" />
			<content type="html"><![CDATA[<p><strong>Alectric</strong><br />Хах , а кроме?</p>]]></content>
			<author>
				<name><![CDATA[cahtbap1]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34377</uri>
			</author>
			<updated>2017-05-10T15:59:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115773#p115773</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Разделение 1 переменной на несколько]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115772#p115772" />
			<content type="html"><![CDATA[<p>Пренебрёг форматированием, и твой код тяжело прочитать.</p><p>Решается в пару пробелов:<br /></p><div class="codebox"><pre><code>print(x3)
{
  if x3 not contains ¦
  {
    send,%x3%
    return
  }
  StringReplace, _, x3, ¦,, UseErrorLevel
  e:=Mod(errorlevel,2)
  if e = 1
  {
    MsgBox Error¦
    return
  }
  loop
  {
    RegExMatch(x3,&quot;([^¦]*)¦([^¦]*)¦(.*)&quot;, x)
    Send,%x1%
    sleep,%x2%
    if x3 not contains ¦
    {
      Send, %x3%
      return
    }
  }
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2017-05-10T15:57:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115772#p115772</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Разделение 1 переменной на несколько]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115771#p115771" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Alectric пишет:</cite><blockquote><p>Чтобы случайно не изменить исходные данные. Если они потребуются в дальнейшем.</p></blockquote></div><p>Понятно <img src="//forum.script-coding.com/img/smilies/big_smile.png" width="15" height="15" /> , а что еще я сделал не так?<br /></p><div class="codebox"><pre><code>y=`nyea{!}♦1000♦its working{! 5}♦700♦ITS WORKING{! 8}♦400♦`nTHANKS ALECTRIC{! 20}♦400♦`nTHANKS ALECTRIC{! 20}♦400♦`nTHANKS ALECTRIC{! 20}
print(y)
print(y)
return
print(x3)
{
if x3 not contains ♦
{
send,%x3%
return
}
StringReplace, _, x3, ♦,, UseErrorLevel
e:=Mod(errorlevel,2)
if e = 1
{
MsgBox Error♦
return
}
loop
{
RegExMatch(x3,&quot;([^♦]*)♦([^♦]*)♦(.*)&quot;, x)
Send,%x1%
sleep,%x2%
if x3 not contains ♦
{
Send, %x3%
return
}
}
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[cahtbap1]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34377</uri>
			</author>
			<updated>2017-05-10T15:41:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115771#p115771</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Разделение 1 переменной на несколько]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115770#p115770" />
			<content type="html"><![CDATA[<p>Чтобы случайно не изменить исходные данные. Если они потребуются в дальнейшем.<br /></p><div class="codebox"><pre><code>a=10

f1(a)
msgbox,% a
f2(a)
msgbox,% a



f1(a)
{
  a=20
}

f2(byref a)
{
  a=20
}

</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2017-05-10T15:05:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115770#p115770</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Разделение 1 переменной на несколько]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115769#p115769" />
			<content type="html"><![CDATA[<p>Спасибо.<br /></p><div class="quotebox"><cite>Alectric пишет:</cite><blockquote><p>Для X ByRef не нужен.</p></blockquote></div><p>Почему нет?</p>]]></content>
			<author>
				<name><![CDATA[cahtbap1]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34377</uri>
			</author>
			<updated>2017-05-10T15:03:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115769#p115769</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Разделение 1 переменной на несколько]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115768#p115768" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>x=123¦100¦223¦2222¦324
RegExMatch(x,&quot;([^¦]*)¦([^¦]*)¦(.*)&quot;, find)
msgbox,% find1 &quot;`n&quot; find2 &quot;`n&quot; find3 &quot;`n&quot;
</code></pre></div><div class="quotebox"><cite>cahtbap1 пишет:</cite><blockquote><p>Get(ByRef a,ByRef b,ByRef c,ByRef x)</p></blockquote></div><p>Для X ByRef не нужен.</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2017-05-10T14:43:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115768#p115768</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Разделение 1 переменной на несколько]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115767#p115767" />
			<content type="html"><![CDATA[<p>Немного разобрался с функциями.<br /></p><div class="codebox"><pre><code>
x=123♦100♦223♦2222♦324
StringReplace, _, x, ♦,, UseErrorLevel
e:=Mod(errorlevel,2)
if e = 1
	return
Get(a,b,c,x)
MsgBox,%a%`n%b%`n%c%
return
Get(ByRef a,ByRef b,ByRef c,ByRef x)
{
a:=RegExReplace(x,&quot;♦.*&quot;,&quot;&quot;)
c:=RegExReplace(x,a &quot;♦&quot;,&quot;&quot;)
b:=RegExReplace(c,&quot;♦.*&quot;,&quot;&quot;)
c:=RegExReplace(c,b &quot;♦&quot;,&quot;&quot;)
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[cahtbap1]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34377</uri>
			</author>
			<updated>2017-05-10T14:25:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115767#p115767</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Разделение 1 переменной на несколько]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115766#p115766" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong><br />Да , верно.</p>]]></content>
			<author>
				<name><![CDATA[cahtbap1]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34377</uri>
			</author>
			<updated>2017-05-10T14:23:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115766#p115766</id>
		</entry>
</feed>
