<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Добавление в скрипт Menu]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=11585</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11585&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Добавление в скрипт Menu».]]></description>
		<lastBuildDate>Fri, 13 May 2016 11:38:07 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Добавление в скрипт Menu]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=103736#p103736</link>
			<description><![CDATA[<p>Понял, спасибо.</p>]]></description>
			<author><![CDATA[null@example.com (SeaVodikendu)]]></author>
			<pubDate>Fri, 13 May 2016 11:38:07 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=103736#p103736</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Добавление в скрипт Menu]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=103731#p103731</link>
			<description><![CDATA[<div class="codebox"><pre><code>#Persistent 
Menu, tray, add 
Menu, tray, add, Пункт1, MenuHandler

MenuHandler(ItemName, ItemPos, MenuName)
{
	Global
MsgBox %verk%
}

Msgbox, Hi

verk := &quot;wqerty&quot;</code></pre></div><p>Надо что бы функция была глобальная и текст в переменной был в кавычках.</p>]]></description>
			<author><![CDATA[null@example.com (yalanne)]]></author>
			<pubDate>Fri, 13 May 2016 09:46:31 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=103731#p103731</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Добавление в скрипт Menu]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=103727#p103727</link>
			<description><![CDATA[<div class="codebox"><pre><code>#Persistent 
Menu, tray, add 
Menu, tray, add, Пункт1, MenuHandler

MenuHandler(ItemName, ItemPos, MenuName)
{
MsgBox %verk%
}

Msgbox, Hi

verk := wqerty</code></pre></div><p>Почему не читает переменную &quot;verk&quot;?</p>]]></description>
			<author><![CDATA[null@example.com (SeaVodikendu)]]></author>
			<pubDate>Fri, 13 May 2016 09:13:25 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=103727#p103727</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Добавление в скрипт Menu]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=103726#p103726</link>
			<description><![CDATA[<p>Спасибо.</p>]]></description>
			<author><![CDATA[null@example.com (SeaVodikendu)]]></author>
			<pubDate>Fri, 13 May 2016 08:40:58 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=103726#p103726</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Добавление в скрипт Menu]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=103717#p103717</link>
			<description><![CDATA[<div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;Вариант 1. перенести до первого прерывания нужную строку.</div><div class="fancy_spoiler"><div class="codebox"><pre><code>#Persistent 
Menu, tray, add 
Menu, tray, add, Пункт1, MenuHandler
Msgbox, Hi ; перенести сюда то что должно быть при запуске скрипта.
return

MenuHandler:
MsgBox Вы выбрали %A_ThisMenuItem% из меню %A_ThisMenu%.
return </code></pre></div></div></div><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;Вариант 2. переходить по метке. Goto\Gosub.</div><div class="fancy_spoiler"><div class="codebox"><pre><code>#Persistent 
Menu, tray, add 
Menu, tray, add, Пункт1, MenuHandler
Goto next ; Создать метку перехода.
return

MenuHandler:
MsgBox Вы выбрали %A_ThisMenuItem% из меню %A_ThisMenu%.
return 


next: 
Msgbox, Hi</code></pre></div></div></div><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;Вариант 3. Вместо метки для меню можно использовать функцию, она не прерывает поток.</div><div class="fancy_spoiler"><div class="codebox"><pre><code>#Persistent 
Menu, tray, add 
Menu, tray, add, Пункт1, MenuHandler

MenuHandler(ItemName, ItemPos, MenuName) ; указываем просто как функцию.
{
; ItemName, ItemPos, MenuName - можно задать свои имена для этих переменных. они содержат то же самое что и 
; A_ThisMenuItem, A_ThisMenuItemPos,A_ThisMenu
MsgBox Вы выбрали %A_ThisMenuItem% из меню %A_ThisMenu%.
}

Msgbox, Hi</code></pre></div></div></div>]]></description>
			<author><![CDATA[null@example.com (yalanne)]]></author>
			<pubDate>Fri, 13 May 2016 06:36:36 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=103717#p103717</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Добавление в скрипт Menu]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=103716#p103716</link>
			<description><![CDATA[<p>Menu не блокирует. Команда return прерывает текущий поток. Просто уберите ее после команд Menu, и будет выполняться код ниже.</p>]]></description>
			<author><![CDATA[null@example.com (mafckz)]]></author>
			<pubDate>Fri, 13 May 2016 06:15:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=103716#p103716</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Добавление в скрипт Menu]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=103715#p103715</link>
			<description><![CDATA[<p>Здравствуйте.<br />Помогите разобраться как правильно добавить в скрипт Menu, Tray.<br /></p><div class="codebox"><pre><code>
#Persistent 
Menu, tray, add 
Menu, tray, add, Пункт1, MenuHandler
return

MenuHandler:
MsgBox Вы выбрали %A_ThisMenuItem% из меню %A_ThisMenu%.
return 

Msgbox, Hi</code></pre></div><p>По идее должно при запуске скрипта показывать Msgbox с &quot;Hi&quot;.<br />А Menu блокирует все что прописано после него.</p>]]></description>
			<author><![CDATA[null@example.com (SeaVodikendu)]]></author>
			<pubDate>Fri, 13 May 2016 05:56:45 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=103715#p103715</guid>
		</item>
	</channel>
</rss>
