<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Показ/скрытие элемента GUI]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=18099&amp;type=atom" />
	<updated>2024-02-13T07:31:50Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=18099</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показ/скрытие элемента GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160347#p160347" />
			<content type="html"><![CDATA[<p>Я ошибочно принял за нужную мне переменную - переменную из этой строки:<br /></p><div class="codebox"><pre><code>Gui, Add, Text,     x158 y33 h28 w60 vBtn3, DPI:</code></pre></div><p>Хотя нужная находилась в строке с Edit.</p>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2024-02-13T07:31:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160347#p160347</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показ/скрытие элемента GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160346#p160346" />
			<content type="html"><![CDATA[<p>Если вы про переменную Btn3, то её значения не было и в первом MsgBox.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2024-02-13T07:28:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160346#p160346</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показ/скрытие элемента GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160345#p160345" />
			<content type="html"><![CDATA[<p>Ошибся. Я думал что нужная мне переменная - это Btn3, а это оказалась Btn2. Извиняюсь!</p>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2024-02-13T07:26:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160345#p160345</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показ/скрытие элемента GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160344#p160344" />
			<content type="html"><![CDATA[<p>Это код из сообщения №24. Там переменная попадает в msgbox, а потом следующей строкой идет второй msgbox - в котором эта переменная уже обнулилась.</p>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2024-02-13T07:20:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160344#p160344</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показ/скрытие элемента GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160343#p160343" />
			<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-02-13T07:17:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160343#p160343</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показ/скрытие элемента GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160342#p160342" />
			<content type="html"><![CDATA[<p>Разве это не магия)?</p>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2024-02-13T07:14:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160342#p160342</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показ/скрытие элемента GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160341#p160341" />
			<content type="html"><![CDATA[<p>Извиняюсь - отредактировал код (добавив &quot;msgbox %Btn1%`n%Btn2%`n%Btn3%&quot;). Суть в том, что если после запуска нажать ОК - выйдет окно со значениями двух переменных. Но ниже эти переменные каким то образом очищаются и перестают отображаться, даже если вот так прописать:<br /></p><div class="codebox"><pre><code>msgbox %Btn1%`n%Btn2%`n%Btn3%
msgbox %Btn3%</code></pre></div>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2024-02-13T07:12:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160341#p160341</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показ/скрытие элемента GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160340#p160340" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>1srafel пишет:</cite><blockquote><p>почему переменная &quot;Btn3&quot; попадает в msgbox</p></blockquote></div><p>Что вы имеете в виду?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2024-02-13T07:04:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160340#p160340</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показ/скрытие элемента GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160339#p160339" />
			<content type="html"><![CDATA[<p>Но тут новая загвоздка: не пойму, почему переменная &quot;Btn3&quot; попадает в msgbox, но в цикле уже не действует:<br /></p><div class="codebox"><pre><code>Gui:
   Gui, Add, Text,     x158 y33 h28 w60 vBtn3, DPI:
   Gui, Add, ComboBox, x30 y31 w100 vExtTo gBtn_Change, JPG||PDF
   Gui, Add, Edit,     x208 y31 h25 w60 vBtn2, 300
   Gui, Add, Checkbox, x152 y27 h36 w130 Hidden vBtn1, В один файл
   Gui, Add, Button, x98 y125 h36 w105 default, OK

   Gui, Show, h176 w292, pdf2img
Return

Btn_Change:
Gui Submit, NoHide
GuiControl, % ExtTo = &quot;PDF&quot; ? &quot;Show&quot; : &quot;Hide&quot;, Btn1
GuiControl, % ExtTo = &quot;PDF&quot; ? &quot;Hide&quot; : &quot;Show&quot;, Btn2
GuiControl, % ExtTo = &quot;PDF&quot; ? &quot;Hide&quot; : &quot;Show&quot;, Btn3
Return

ButtonOK:
Gui, Submit
global Btn3
msgbox %Btn1%`n%Btn2%`n%Btn3%
msgbox %Btn3%

Loop, 20 {
   msgbox ---------%Btn3%
}
Return

GuiClose:
GuiEscape:
   Gui, Destroy
   ToolTip
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2024-02-13T06:57:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160339#p160339</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показ/скрытие элемента GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160338#p160338" />
			<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-02-13T06:49:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160338#p160338</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показ/скрытие элемента GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160336#p160336" />
			<content type="html"><![CDATA[<p>Спасибо, так заработало:<br /></p><div class="codebox"><pre><code>
GuiControl, % ExtTo = &quot;PDF&quot; ? &quot;Show&quot; : &quot;Hide&quot;, cb1
GuiControl, % ExtTo = &quot;PDF&quot; ? &quot;Hide&quot; : &quot;Show&quot;, cb2
GuiControl, % ExtTo = &quot;PDF&quot; ? &quot;Hide&quot; : &quot;Show&quot;, cb3</code></pre></div>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2024-02-13T05:59:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160336#p160336</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показ/скрытие элемента GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160335#p160335" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>1srafel пишет:</cite><blockquote><p>Но без них все равно</p></blockquote></div><p>Программирование — это не магия, тут не заклинания, а логично устроенные команды. Не надо ничего удалять или добавлять, не понимая, что делаете.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2024-02-12T22:53:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160335#p160335</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показ/скрытие элемента GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160334#p160334" />
			<content type="html"><![CDATA[<p>Можно конечно удалить строки, из которых для основного кода нужны только переменные:<br /></p><div class="codebox"><pre><code>GuiControl % ddDPI = &quot;JPG&quot; ? &quot;Hide&quot; : &quot;Show&quot;, cb2
GuiControl % TText = &quot;JPG&quot; ? &quot;Hide&quot; : &quot;Show&quot;, cb3</code></pre></div><p>Но без них все равно при наведении курсора Edit будет перекрывать Checkbox. Спасибо, поразбираюсь.</p>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2024-02-12T22:49:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160334#p160334</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показ/скрытие элемента GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160333#p160333" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>1srafel пишет:</cite><blockquote><p>ddDPI и ExtTo взялись по аналогии из первого кода, и нужны они для того чтобы в них содержалась инфа из Edit и ComboBox.</p></blockquote></div><p>Нет, не по аналогии.<br /></p><div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>читайте про связанную с контролом переменную, зачем она нужна, как получить в неё текущее значение</p></blockquote></div><p>Прочитали? Похоже, что нет. ExtTo — это переменная, связанная с контролом ComboBox. А ddDPI и TText взяты из воздуха.<br />Да и зачем приводить части кода, который отсутствует и заведомо не будет работать?<br />Просто разберитесь, как работает данный механизм:<br /></p><div class="codebox"><pre><code>CB_Change:
Gui Submit, NoHide
GuiControl % ExtTo = &quot;PDF&quot; ? &quot;Show&quot; : &quot;Hide&quot;, cb1</code></pre></div><p>Тогда вопросы должны исчезнуть сами собой.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2024-02-12T22:38:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160333#p160333</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показ/скрытие элемента GUI]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160332#p160332" />
			<content type="html"><![CDATA[<p>Так о том и речь, что второй код я привел как пример неработающего варианта с неудачной правкой. То есть, &quot;текущим кодом&quot;, о котором вы сказали выше - надо считать первый код. А второй - заведомо неточно работает. </p><p>ddDPI и ExtTo взялись по аналогии из первого кода, и нужны они для того чтобы в них содержалась инфа из Edit и ComboBox. То есть, они должны использоваться далее по коду, который здесь опущен.</p>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2024-02-12T22:13:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160332#p160332</id>
		</entry>
</feed>
