<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Подскажите, возможно ли 2 указанных скрипта обьединить в один]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=6137</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=6137&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Подскажите, возможно ли 2 указанных скрипта обьединить в один».]]></description>
		<lastBuildDate>Sun, 21 Aug 2011 07:01:58 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Подскажите, возможно ли 2 указанных скрипта обьединить в один]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=50769#p50769</link>
			<description><![CDATA[<p>Спасибо, работает.</p>]]></description>
			<author><![CDATA[null@example.com (Wermat)]]></author>
			<pubDate>Sun, 21 Aug 2011 07:01:58 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=50769#p50769</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подскажите, возможно ли 2 указанных скрипта обьединить в один]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=50768#p50768</link>
			<description><![CDATA[<div class="codebox"><pre><code>num_rays = 6

k_1 = {NumPad8}
k_2 = {NumPad9}
k_3 = {P}
k_4 = {J}
k_5 = +{J}
k_6 = +{O}

k2_1 = {NumPad1}
k2_2 = {NumPad2}
k2_3 = {NumPad3}
k2_4 = {NumPad4}
k2_5 = {NumPad5}
k2_6 = {NumPad6}

cd_1 = 13000
cd_2 = 6000
cd_3 = 13000
cd_4 = 8000
cd_5 = 4000
cd_6 = 5000

cd2_1 = 6500
cd2_2 = 13000
cd2_3 = 12000
cd2_4 = 13000
cd2_5 = 8000
cd2_6 = 1000

p_1 = 1
p_2 = 2
p_3 = 3
p_4 = 4
p_5 = 5
p_6 = 6

While A_Index &lt;= num_rays
{
   r_%A_Index% = 1
   r2_%A_Index% = 1
}

SC025:: ; k
   Send, {Q}
   Sleep, 250
   cur_ray := RayLogic(cur_ray, cur_key, cur_cool)
   Send , %cur_key%
   While (ErrorLevel = 1)
   {
      If (GetKeyState(&quot;SC025&quot;, &quot;P&quot;) = 1)
      Return
      KeyWait, Lbutton, T.2
   }
   r_%cur_ray% = 0
   neg_cur_cool := -cur_cool
   SetTimer , %cur_ray% , %neg_cur_cool%
   Return

SC026:: ; l
   Send, {SC013} ; r
   Sleep, 250
   cur2_ray := RayLogic2(cur2_ray, cur2_key, cur2_cool)
   Send , %cur2_key%
   While (ErrorLevel = 1)
   {
      If (GetKeyState(&quot;SC026&quot;, &quot;P&quot;) = 1)
         Return
      KeyWait, Lbutton, T.2
   }
   r2_%cur2_ray% = 0
   neg_cur2_cool := -cur2_cool
   SetTimer , %cur2_ray% , %neg_cur2_cool%
   Return

1:
2:
3:
4:
5:
6:
   r_%A_ThisLabel% = 1
   r2_%A_ThisLabel% = 1
   Return

RayLogic(cur_ray, ByRef cur_key, ByRef cur_cool)
{
   global
   cur_ray := p_1
   While A_Index &lt;= num_rays
   {
      ray_number := p_%A_Index%
      if (r_%ray_number% = 1)
      {
         cur_ray := ray_number
         Break
      }
   }
   cur_key := k_%cur_ray%
   cur_cool := cd_%cur_ray%
   Return cur_ray
}

RayLogic2(cur2_ray, ByRef cur2_key, ByRef cur2_cool)
{
   global
   cur2_ray := p_1
   While A_Index &lt;= num_rays
   {
      ray_number := p_%A_Index%
      if (r2_%ray_number% = 1)
      {
         cur2_ray := ray_number
         Break
      }
   }
   cur2_key := k2_%cur2_ray%
   cur2_cool := cd2_%cur2_ray%
   Return cur2_ray
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Sun, 21 Aug 2011 01:00:19 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=50768#p50768</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Подскажите, возможно ли 2 указанных скрипта обьединить в один]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=50767#p50767</link>
			<description><![CDATA[<div class="codebox"><pre><code>num_rays = 6


k_1 = {NumPad8} 
k_2 = {NumPad9} 
k_3 = {P} 
k_4 = {J}
k_5 = +{J}
k_6 = +{O}

cd_1 = 13000 
cd_2 = 6000
cd_3 = 13000
cd_4 = 8000
cd_5 = 4000
cd_6 = 5000


p_1 = 1 
p_2 = 2 
p_3 = 3 
p_4 = 4 
p_5 = 5
P_6 = 6

While A_Index &lt;= num_rays
{
r_%A_Index% = 1
}


SC025::
Send, {Q}
Sleep, 250
cur_ray := RayLogic(cur_ray, cur_key, cur_cool)
Send , %cur_key%
While (ErrorLevel = 1)
{
If (GetKeyState(&quot;SC025&quot;, &quot;P&quot;) = 1)
Return
KeyWait, Lbutton, T.2
}
r_%cur_ray% = 0
neg_cur_cool := -cur_cool
SetTimer , %cur_ray% , %neg_cur_cool%
Return


1:
2:
3:
4:
5:
6:
r_%A_ThisLabel% = 1
Return

RayLogic(cur_ray, ByRef cur_key, ByRef cur_cool)
{
global


cur_ray := p_1


While A_Index &lt;= num_rays
{
ray_number := p_%A_Index%
if (r_%ray_number% = 1)
{
cur_ray := ray_number
Break
}
}

cur_key := k_%cur_ray%
cur_cool := cd_%cur_ray%

Return cur_ray
}</code></pre></div><div class="codebox"><pre><code>num_rays = 6


k_1 = {NumPad1} 
k_2 = {NumPad2} 
k_3 = {NumPad3} 
k_4 = {NumPad4} 
k_5 = {NumPad5} 
k_6 = {NumPad6} 


cd_1 = 6500  
cd_2 = 13000 
cd_3 = 12000 
cd_4 = 13000 
cd_5 = 8000 
cd_6 = 1000  



p_1 = 1 
p_2 = 2 
p_3 = 3 
p_4 = 4 
p_5 = 5 
p_6 = 6 


While A_Index &lt;= num_rays
{
r_%A_Index% = 1
}


SC026::
Send, {SC013}
Sleep, 250
cur_ray := RayLogic(cur_ray, cur_key, cur_cool)
Send , %cur_key%
While (ErrorLevel = 1)
{
If (GetKeyState(&quot;SC026&quot;, &quot;P&quot;) = 1)
Return
KeyWait, Lbutton, T.2
}
r_%cur_ray% = 0
neg_cur_cool := -cur_cool
SetTimer , %cur_ray% , %neg_cur_cool%
Return


1:
2:
3:
4:
5:
6:
r_%A_ThisLabel% = 1
Return

RayLogic(cur_ray, ByRef cur_key, ByRef cur_cool)
{
global


cur_ray := p_1


While A_Index &lt;= num_rays
{
ray_number := p_%A_Index%
if (r_%ray_number% = 1)
{
cur_ray := ray_number
Break
}
}

cur_key := k_%cur_ray%
cur_cool := cd_%cur_ray%

Return cur_ray
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Wermat)]]></author>
			<pubDate>Sat, 20 Aug 2011 23:37:28 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=50767#p50767</guid>
		</item>
	</channel>
</rss>
