<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: DropDownList ,конвертировать и поместить в переменную.]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=18286&amp;type=atom" />
	<updated>2024-08-24T13:25:53Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=18286</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList ,конвертировать и поместить в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161490#p161490" />
			<content type="html"><![CDATA[<p>Ага, припоминаю, но в данном случае вряд ли такое попадётся.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2024-08-24T13:25:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161490#p161490</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList ,конвертировать и поместить в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161489#p161489" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, шаблон \Q...\E &quot;опасно&quot; использовать без конвертирования строки.<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=159732#p159732">http://forum.script-coding.com/viewtopi … 32#p159732</a></p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2024-08-24T12:54:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161489#p161489</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList ,конвертировать и поместить в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161483#p161483" />
			<content type="html"><![CDATA[<p>Спасибо всем за участие все варианты хороши !</p>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2024-08-24T07:55:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161483#p161483</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList ,конвертировать и поместить в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161479#p161479" />
			<content type="html"><![CDATA[<p>Или так:<br /></p><div class="codebox"><pre><code>preparats := &quot;Аспирин;ASPIRINE||Парацетомол;PARACETOMOL|Витамин;VITAMIN&quot;
Gui, Add, DropDownList, vPreparat w300, % RegExReplace(preparats, &quot;;[^|]+&quot;)
Gui, Show,
Return

*NumPad0::
    GuiControlGet, Preparat
    RegExMatch(preparats, &quot;\Q&quot; . Preparat . &quot;\E;\K[^|]+&quot;, m)
    SendInput, % m
return

GuiClose:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2024-08-24T07:02:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161479#p161479</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList ,конвертировать и поместить в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161477#p161477" />
			<content type="html"><![CDATA[<p>Я бы как-то так сделал бы:<br /></p><div class="codebox"><pre><code>arr := [{&quot;Аспирин&quot;: &quot;ASPIRINE&quot;}, {&quot;Парацетомол&quot;: &quot;PARACETOMOL&quot;}, {&quot;Витамин&quot;: &quot;VITAMIN&quot;}]
dictionary := {}, str := &quot;&quot;
for k, v in arr
{
   for k1, v1 in v
   {
      dictionary[k1 &quot;&quot;] := v1
      str .= k1 &quot;|&quot;
   }
}
str := substr(str, 1, -1)
Gui, Add, DropDownList, vPreparat w300, % str
Gui, Show,
Return

*NumPad0::
    GuiControlGet, Preparat
    SendInput, % dictionary[Preparat &quot;&quot;]
return

GuiClose:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2024-08-23T23:38:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161477#p161477</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList ,конвертировать и поместить в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161476#p161476" />
			<content type="html"><![CDATA[<p>Немного более технологично:<br /></p><div class="codebox"><pre><code>dictionary := {Аспирин: &quot;ASPIRINE&quot;, Парацетомол: &quot;PARACETOMOL&quot;, Витамин: &quot;VITAMIN&quot;}
Gui, Add, DropDownList, vPreparat w300, Аспирин|Парацетомол|Витамин
Gui, Show,
Return

*NumPad0::
    GuiControlGet, Preparat
    SendInput, % dictionary[Preparat]
return

GuiClose:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2024-08-23T22:36:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161476#p161476</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: DropDownList ,конвертировать и поместить в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161474#p161474" />
			<content type="html"><![CDATA[<p><strong>Ядрён</strong><br />Добрый вечер, можете попробовать:</p><div class="codebox"><pre><code>Gui, Add, DropDownList, vPreparat gDropDownList w300, Аспирин|Парацетомол|Витамин
Gui, Show,
Return

*vk60::
Gui Submit, NoHide
; Проверка и замена русского значения на английское
if (Preparat = &quot;Аспирин&quot;) {
    SendInput, ASPIRINE
} else if (Preparat = &quot;Парацетомол&quot;) {
    SendInput, PARACETOMOL
} else if (Preparat = &quot;Витамин&quot;) {
    SendInput, VITAMIN
}
sleep, 500
return

DropDownList:
Аспирин := ASPIRINE
Парацетомол := PARACETOMOL
Витамин := VITAMIN
Return

GuiClose:
ExitApp
</code></pre></div><p>Других способов лично я не знаю. Возможно подскажут более лучшие варинаты.</p>]]></content>
			<author>
				<name><![CDATA[sajkdajsdjqwje]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43968</uri>
			</author>
			<updated>2024-08-23T21:13:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161474#p161474</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: DropDownList ,конвертировать и поместить в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161468#p161468" />
			<content type="html"><![CDATA[<p>Доброго времени суток. Помогите разобраться ,как название пункта DropDownList ,конвертировать и поместить в переменную.</p><div class="codebox"><pre><code>%Preparat%</code></pre></div><p> </p><div class="codebox"><pre><code>Gui, Add, DropDownList, vPreparat gDropDownList w300, Аспирин|Парацетомол|Виттамин|
Gui, Show,
Return


 *vk60::
Gui Submit, NoHide
SendInput, %Preparat% 
sleep, 500
Return

DropDownList:
Аспирин := ASPIRINE
Парацетомол := PARACETOMOL
Витамин := VITAMIN
Return

Return
GuiClose:
ExitApp</code></pre></div><br /><br /><p>В итоге должно получиться при выборе в &quot;DropDownList&quot; послать слово на английском языке.</p>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2024-08-23T02:40:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161468#p161468</id>
		</entry>
</feed>
