<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: DropDownList + Hotkey]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=17476&amp;type=atom" />
	<updated>2022-11-20T13:37:52Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=17476</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList + Hotkey]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155729#p155729" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, спасибо большое!</p>]]></content>
			<author>
				<name><![CDATA[will]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42886</uri>
			</author>
			<updated>2022-11-20T13:37:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155729#p155729</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList + Hotkey]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155725#p155725" />
			<content type="html"><![CDATA[<p>Смотрите команду Switch.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-11-20T10:05:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155725#p155725</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList + Hotkey]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155724#p155724" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, хорошо а как сделать чтоб при Item1 выполнялось 1 действие, а при Item2 Другое ? Вывод я сам ещё разобрался давно, а вот с этим проблема.</p>]]></content>
			<author>
				<name><![CDATA[will]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42886</uri>
			</author>
			<updated>2022-11-20T10:03:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155724#p155724</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList + Hotkey]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155723#p155723" />
			<content type="html"><![CDATA[<p>Пример:<br /></p><div class="codebox"><pre><code>Gui, Add, DropDownList, vMyList, Item1||Item2|Item3
Gui, Show

F10::
   GuiControlGet, MyList
   MsgBox, % MyList
   Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-11-19T21:03:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155723#p155723</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList + Hotkey]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155722#p155722" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong> я не понял в этой справке, поэтому и обратился на форум чтоб мне помогли и дали&nbsp; пример как это сделать...</p>]]></content>
			<author>
				<name><![CDATA[will]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42886</uri>
			</author>
			<updated>2022-11-19T18:45:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155722#p155722</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList + Hotkey]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155721#p155721" />
			<content type="html"><![CDATA[<p>В справке же написано как хранить переменные у элементов управления - <a href="https://www.script-coding.com/AutoHotkey/GUIControls.html#dropdownlist">GUIControls</a>. Как вы вообще хотите программировать если не знаете простого?</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2022-11-19T18:33:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155721#p155721</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList + Hotkey]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155718#p155718" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong>,&nbsp; не понял, как тогда сделать чтоб при активации клавиши, срабатывало то что выбрано в DropDownList? Можно не большой пример или более подробно?</p>]]></content>
			<author>
				<name><![CDATA[will]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42886</uri>
			</author>
			<updated>2022-11-19T17:34:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155718#p155718</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList + Hotkey]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155717#p155717" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>...когда ты выбираешь что то в DropDownList она сразу активируется...</p></blockquote></div><p>Метку убрать - вопрос решён. Зачем городить лишнее?</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2022-11-19T17:19:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155717#p155717</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList + Hotkey]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155716#p155716" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong>, можно но у многих разное понимание лишних команд. <br /></p><div class="codebox"><pre><code>SetWorkingDir %A_ScriptDir%
SetBatchLines -1

IniRead, Key,data/test2.egl, USER, Key

Gui Font, s9, Segoe UI
Gui Add, DropDownList,  x8 y8 w218 gVib,Test|Test1|
Gui Add, Hotkey, x8 y40 w218 h23 vKey,%Key% 
Gui Add, Button, x8 y68 w218 h23 gSave, &amp;Save

Gui Show, w230 h100, Test
Return

GuiEscape:
GuiClose:
    ExitApp

Save:
Gui, submit, nohide
IniWrite, %Key%,data/test2.egl, USER, Key
HotKey, %Key%, Off, UseErrorLevel
Gui, Submit, NoHide,
HotKey, %Key%, Activate, On, UseErrorLevel
Return


Vib:
   if A_GuiControl = Test
      Goto Ac1
   if A_GuiControl = Test1
      Goto Ac2
Return

Ac1:
        Loop, 5
            {
                MsgBox, tyda11
Sleep 1500
            }
Return

Ac2:
        Loop, 5
            {
                MsgBox, tyda12
    Sleep 1500
            }
Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[will]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42886</uri>
			</author>
			<updated>2022-11-19T16:08:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155716#p155716</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList + Hotkey]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155713#p155713" />
			<content type="html"><![CDATA[<p>Нельзя ли выложить нормальный пример без лишних команд?</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2022-11-19T15:47:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155713#p155713</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: DropDownList + Hotkey]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155711#p155711" />
			<content type="html"><![CDATA[<p>Всем привет, суть в том что когда ты выбираешь что то в DropDownList она сразу активируется, а мне надо чтоб оно активировалась по клавише (В скрипте &quot;Activate&quot; тк. Hotkey). Заранее спасибо за помощь.<br /></p><div class="codebox"><pre><code>SetWorkingDir %A_ScriptDir%
SetBatchLines -1

IniRead, Key,data/test2.egl, USER, Key

Gui Font, s9, Segoe UI
Gui Add, DropDownList,  x8 y8 w218 gVib,Test|Test1|Test2|Test3[/color]
GuiControl, ChooseString, Vib, %Vib%
Gui Add, Hotkey, x8 y40 w218 h23 vKey,%Key%
Gui Add, Button, x8 y68 w218 h23 gSave, &amp;Save

Gui Show, w230 h100, Test
Return

GuiEscape:
GuiClose:
    ExitApp

Save:
Gui, submit, nohide
IniWrite, %Key%,data/test2.egl, USER, Key
HotKey, %Key%, Off, UseErrorLevel
Gui, Submit, NoHide,
HotKey, %Key%, Activate, On, UseErrorLevel
Return


Vib:
   if A_GuiControl = Test
      Goto Ac1
   if A_GuiControl = Test1
      Goto Ac2
   if A_GuiControl = Test2
      Goto Ac3
   if A_GuiControl = Test3
      Goto Ac4
Return

Ac1:
        Loop, 5
            {
                MsgBox, tyda11
Sleep 1500
            }
Return

Ac2:
        Loop, 5
            {
                MsgBox, tyda12
    Sleep 1500
            }
Return

Ac3:
        Loop, 5
            {
                MsgBox, tyda13
    Sleep 1500
            }
Return

Ac4:
        Loop, 5
            {
                MsgBox, tyda14
    Sleep 1500
            }
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[will]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42886</uri>
			</author>
			<updated>2022-11-19T15:33:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155711#p155711</id>
		</entry>
</feed>
