<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Возвращение значения переменной в поле ввода Edit.]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13381&amp;type=atom" />
	<updated>2018-01-19T07:03:02Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13381</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возвращение значения переменной в поле ввода Edit.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123187#p123187" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong>,<br />Я вставил в кнопку gOk, иначе я не могу стереть последний символ в строке Edit.<br />Теперь всё выполняется как я и хотел, спасибо большое!<br /></p><div class="codebox"><pre><code>OK:
{
if Bukva is space
{
Bukva:=Rez
GuiControl, -g, Bukva
GuiControl, , Bukva, % Bukva
GuiControl, +gEdit, Bukva
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Gutalin]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39002</uri>
			</author>
			<updated>2018-01-19T07:03:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123187#p123187</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возвращение значения переменной в поле ввода Edit.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123177#p123177" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
Gui, Add, Edit, vBukva gEdit
Gui, Show
Return

Edit:
    GuiControlGet, tBukva, , Bukva
    If (tBukva ~= &quot;i)[^0-9A-Z]&quot; || (tBukva = &quot;&quot;) || (0, Bukva := tBukva))
	{
		GuiControl, -g, Bukva
		GuiControl, , Bukva, % Bukva
		GuiControl, +gEdit, Bukva
	}
    Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2018-01-18T15:27:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123177#p123177</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возвращение значения переменной в поле ввода Edit.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123150#p123150" />
			<content type="html"><![CDATA[<p><strong>stealzy</strong>, в моём основном коде в gEdit вот это:<br /></p><div class="codebox"><pre><code>Edit:
     GuiControlGet, tBukva, , Bukva  
    If (tBukva ~= &quot;i)[^0-9A-Z]&quot; || (0, Bukva := tBukva))
		GuiControl, , Bukva, % Bukva
    Return</code></pre></div><p>Как это применить к Вашему коду?</p>]]></content>
			<author>
				<name><![CDATA[Gutalin]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39002</uri>
			</author>
			<updated>2018-01-17T14:49:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123150#p123150</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возвращение значения переменной в поле ввода Edit.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123148#p123148" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Gui Add, Edit, vBukva HwndhEdit, % Bukva
Gui Add, Button, gOK, Сохранить
Gui Show
Return

OK:
	Gui Submit, NoHide
	IfEqual Bukva,, GuiControl,, % hEdit, % Rez
	Rez:=Bukva
Return

GuiClose:
GuiEscape:
	ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2018-01-17T14:46:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123148#p123148</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Возвращение значения переменной в поле ввода Edit.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123146#p123146" />
			<content type="html"><![CDATA[<p>В поле Edit выводится значение переменной. Я могу&nbsp; менять значение этой переменной через тоже поле edit. Я хочу сделать, чтобы если я введу в поле пустое значение или пробел, то выводилось прошлое значение переменной.<br />Я сделал так, что если введено пустое значение(или пробел), то значение переменной возвращается прошлое (Из резервной переменной &quot;Rez&quot;), но почему оно в этом случает не отображается в поле Edit?<br />Помогает через Gui, Destroy, но можно ли сделать это по-другому?<br />Код:<br /></p><div class="codebox"><pre><code>Gui, Add, Text, section, Запомнил:
Gui, Add, Edit, x155 y5 h17 w22 vBukva gEdit, %Bukva%
Gui, Add, Button,x70 y33 gOK, Сохранить
Gui, Show, Restore  w200 h170, MyWin,
return

OK:
{
if Bukva is space
{
Bukva:=Rez
}
else
{
Rez:=Bukva
}
msgBox, Значение изменено на %Bukva%
Gui, Destroy,
Gui, Add, Text, section, Запомнил:
Gui, Add, Edit, x155 y5 h17 w22 vBukva gEdit, %Bukva%
Gui, Add, Button,x70 y33 gOK, Сохранить
Gui, Show, Restore  w200 h170, MyWin,
} 
return

Edit:
GuiControlGet, Bukva
Return

Guiclose:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Gutalin]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39002</uri>
			</author>
			<updated>2018-01-17T11:38:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123146#p123146</id>
		</entry>
</feed>
