<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: оптимизация меток в скрипте]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11902&amp;type=atom" />
	<updated>2016-08-14T08:19:54Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11902</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: оптимизация меток в скрипте]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106749#p106749" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Hotkey(&quot;F1&quot;, &quot;getfunc&quot;, 1)
Hotkey(&quot;F2&quot;, &quot;getfunc&quot;, 2)
Hotkey(&quot;F3&quot;, &quot;getfunc&quot;, 3)
Hotkey(&quot;F4&quot;, &quot;getfunc&quot;, 4)

getfunc(var) {
	msgbox % var
}

Hotkey(hk, fun, args*)  {
	funcObj := Func(fun).Bind(args*)
	Hotkey, % hk, % funcObj
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2016-08-14T08:19:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106749#p106749</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: оптимизация меток в скрипте]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106738#p106738" />
			<content type="html"><![CDATA[<p><strong>McFree</strong>, расставьте точки в своих постах.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-08-13T11:39:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106738#p106738</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: оптимизация меток в скрипте]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106733#p106733" />
			<content type="html"><![CDATA[<p>Можно через массивы:<br /></p><div class="codebox"><pre><code>HotKeys := {F1: 1, F2: 2}
F1::
F2::
msgbox % getfunc(HotKeys[A_ThisHotkey])
return

getfunc(var)
{
   return, var
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2016-08-13T03:15:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106733#p106733</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: оптимизация меток в скрипте]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106732#p106732" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong> мне нужна работа на 100 горячих клавиш. А разница в них лишь в том, что там меняется переменная.</p>]]></content>
			<author>
				<name><![CDATA[McFree]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33932</uri>
			</author>
			<updated>2016-08-13T02:31:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106732#p106732</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: оптимизация меток в скрипте]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106731#p106731" />
			<content type="html"><![CDATA[<p>А&nbsp; зачем тут вообще метки.<br />Почему не хотите сразу вызывать функцию?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2016-08-12T22:48:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106731#p106731</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: оптимизация меток в скрипте]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106730#p106730" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>McFree</strong>, ознакомьтесь с <a href="http://forum.script-coding.com/viewtopic.php?id=6148">этой</a> темой, отредактируйте заголовок.</span></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-08-12T21:36:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106730#p106730</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: оптимизация меток в скрипте]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106729#p106729" />
			<content type="html"><![CDATA[<p>Слегка изменил код для большей наглядности.</p>]]></content>
			<author>
				<name><![CDATA[McFree]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33932</uri>
			</author>
			<updated>2016-08-12T21:22:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106729#p106729</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: оптимизация меток в скрипте]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106728#p106728" />
			<content type="html"><![CDATA[<p>Доброй ночи серые форумчане, у меня вопрос. Как сократить подобный код. Хотелось бы узнать реально ли уменьшить количество меток, если разница в метках изменяется лишь в изменении значения переменной var.</p><div class="codebox"><pre><code>
Key1:
var = 1
getfunc(var)
return

Key2:
var = 2 
getfunc(var)
return

Key3:
var = 3
getfunc(var)
return

Key4:
var = 4
getfunc(var)
return

Key5:
var = 5
getfunc(var)
return

Key6:
var = 6
getfunc(var)
return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[McFree]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33932</uri>
			</author>
			<updated>2016-08-12T21:14:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106728#p106728</id>
		</entry>
</feed>
