<?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=13602</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13602&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Переменные в параметрах функции».]]></description>
		<lastBuildDate>Thu, 05 Apr 2018 15:34:20 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Переменные в параметрах функции]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124476#p124476</link>
			<description><![CDATA[<p><strong>ypppu</strong>, видел, но прочитанное не удалось осуществить на практике.</p>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Thu, 05 Apr 2018 15:34:20 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124476#p124476</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переменные в параметрах функции]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124472#p124472</link>
			<description><![CDATA[<div class="quotebox"><cite>Русская справка / Функции (v1.0.31+) Ник переводчика: Gourmet пишет:</cite><blockquote><p>Поскольку вызов функции является выражением, не следует заключать в знаки процента имена переменных в списке ее параметров. И напротив, буквальные строки необходимо заключать в двойные кавычки.</p></blockquote></div><p><span class="postimg"><img src="http://risovach.ru/thumb/upload/200s400/2014/02/mem/sashko_42568830_orig_.jpg" alt="http://risovach.ru/thumb/upload/200s400/2014/02/mem/sashko_42568830_orig_.jpg" /></span></p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Thu, 05 Apr 2018 14:05:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124472#p124472</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переменные в параметрах функции]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124466#p124466</link>
			<description><![CDATA[<p><strong>Indomito</strong>, Спасибо! Но мне не ясно, что именно я могу почерпнуть из приведенного примера.</p>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Thu, 05 Apr 2018 04:22:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124466#p124466</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переменные в параметрах функции]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124465#p124465</link>
			<description><![CDATA[<p><strong>becauseim</strong><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>; 1-й параметр отвечает за показ True/False = показывать/не показывать. 
; 2-й параметр время ожидания закрытия процессов не менее 3 секунд.
; 3-й параметр массив процессов
; На выходе список закрытых процессов разделённых &quot;`n&quot;, на последнем нет &quot;`n&quot;
; Формат массива arNetApps := [&quot;процес№1.exe&quot;,&quot;процес№1.exe&quot;,&quot;процес№1.exe&quot;,&quot;процес№99.exe&quot;]   
fnKillWorkProc(vShow, vDelayIs,arListApps*)
{
  arKillWorkProcList  :=[[&quot;,&quot;,&quot;&quot;]]
  cMaxArListApps :=  arListApps.MaxIndex()  ;Расчёт длины входного массива
  Loop %cMaxArListApps%
    {
          ;b := arListApps[A_Index]
      arKillWorkProcList[A_Index,1]  := arListApps[A_Index]
      arKillWorkProcList[A_Index,2]  := &quot;&quot;
            ;a := arKillWorkProcList[A_Index,1] ; + arKillWorkProcList[A_Index,2]
            ;MsgBox i=%A_Index% Dist= %b% Param= %a%
    }
  If (vDelayIs&lt;3)
        vDelayIs :=3

  сMsgBoxInfo_Ok      :=0+8192+64 ;only an OK button + Task Modal + Icon Asterisk(info)
; Завершаем процессы
  titul := &quot;Результат закрытия процессов&quot; 
  res :=  &quot;&quot;
  If (vShow)
      res := &quot;`n`n&quot;
  i := 1
  vTF_res :=  False
  While (arKillWorkProcList[i,1])
    {
      CmdLine := arKillWorkProcList[i,1]
      If (fnCheckRestartWaitProcInter(CmdLine, vDelayIs-1))
            {
              CmdLine :=  arKillWorkProcList[i,1]
              CmdLine := &quot;taskkill /F /IM &quot; CmdLine
              RunCon(CmdLine, 0, Output)
              If (vShow)
                    {
                      arKillWorkProcList[i,2] := Output  &quot;`n&quot;
                      res  := res  arKillWorkProcList[i,2]
                    }  
                  Else
                    {
                      arKillWorkProcList[i,2] := Output
                      if (i=1)
                           res := res arKillWorkProcList[i,2]
                         Else
                           res := res &quot;`n&quot; arKillWorkProcList[i,2] 
                    }
              vTF_res :=  True
            }
      i++
    }
  If (vTF_res &amp;&amp; vShow)
        MsgBox, % сMsgBoxInfo_Ok, % titul, % res, % vDelayIs
 
Return  res
}</code></pre></div></div></div>]]></description>
			<author><![CDATA[null@example.com (Indomito)]]></author>
			<pubDate>Thu, 05 Apr 2018 04:14:59 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124465#p124465</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переменные в параметрах функции]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124464#p124464</link>
			<description><![CDATA[<p><strong>teadrinker</strong>, по запросу &quot;переменные в функции&quot; не нашлось. А примеры где-то наверняка есть.<br />Вроде заработало. Спасибо! <br /></p><div class="codebox"><pre><code>pricon := &quot;D:\Soft\AHK\Scripts\icons\Premiere 2018 ACER\&quot;
}
ImageWaitClick(pricon &quot;analyze.png&quot;, 500)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Thu, 05 Apr 2018 01:43:44 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124464#p124464</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переменные в параметрах функции]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124463#p124463</link>
			<description><![CDATA[<p>Неужели на нашем форуме не нашлось ни одного примера использования функций?<br />Переменные передаются в функцию без знаков процента и без кавычек:<br /></p><div class="codebox"><pre><code>var := &quot;text&quot;
MyFunc(var)

MyFunc(str)  {
   MsgBox, % str
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 05 Apr 2018 01:38:01 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124463#p124463</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переменные в параметрах функции]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124462#p124462</link>
			<description><![CDATA[<p><strong>teadrinker</strong>, сейчас все не перечислю. По-всякому варьировал использование символов % и &quot;. В сети сразу найти подходящие примеры не получилось, а документация мне сложна для понимания.</p>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Thu, 05 Apr 2018 01:28:00 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124462#p124462</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переменные в параметрах функции]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124461#p124461</link>
			<description><![CDATA[<p>А какие варианты вы рассматривали?</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 05 Apr 2018 01:23:15 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124461#p124461</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Переменные в параметрах функции]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124459#p124459</link>
			<description><![CDATA[<p>Подскажите, пожалуйста, как верно внести переменную в параметры ф-ии?<br /></p><div class="codebox"><pre><code>
if (A_UserName= &quot;Admin&quot;){
pricon = D:\Soft\AHK\Scripts\icons\Premiere 2018 ACER\
}
ImageWaitClick(pricon &quot;analyze.png&quot;, 500) ; ???
return

ImageWaitClick(pic, time:=1000){
	CoordMode, Pixel, Screen
	EndTime := A_TickCount + time
	While EndTime&gt;A_TickCount {
	ImageSearch, picX, picY, 0, 0, A_ScreenWidth, A_ScreenHeight, % pic 
	If !ErrorLevel
		Break
	}
	If ErrorLevel
		Tippy(&quot;Image Not Found!&quot;, 2000)
	Else
		ClickAndReturn(picX,picY)
}
ClickAndReturn(x,y){
	ControlGetPos ,,,,,, ahk_id %StartCtrl%
	MouseGetPos, StartX, StartY
	MouseClick, , %x%, %y%, , 0.1
	MouseMove, StartX, StartY
}
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (becauseim)]]></author>
			<pubDate>Thu, 05 Apr 2018 00:10:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124459#p124459</guid>
		</item>
	</channel>
</rss>
