<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: GUI переменная edit в sleep]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=6807&amp;type=atom" />
	<updated>2012-02-13T18:31:29Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=6807</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI переменная edit в sleep]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56782#p56782" />
			<content type="html"><![CDATA[<p>Спасибо за помощь и терпение <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[lprooo]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27411</uri>
			</author>
			<updated>2012-02-13T18:31:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56782#p56782</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI переменная edit в sleep]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56781#p56781" />
			<content type="html"><![CDATA[<p><strong>gBox1</strong> это g-label, который активируется при изменении элемента к которому он приписан. Теперь «выполнение» скрипта будет происходить после установки галочки в соответствующий чекбокс.</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-02-13T18:25:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56781#p56781</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI переменная edit в sleep]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56780#p56780" />
			<content type="html"><![CDATA[<p>ну так я же написал свой код скрипта как понимаю , мне не нужен готовый скрипт. Просто хочу понять как работает checkbox. Ладно буду сам дальше пробывать и на этом тоже спасибо.:)</p><br /><p>YMP да переключатель.<br />ПОлучается не хватало лишь элемента &quot;gbox1&quot; ?</p>]]></content>
			<author>
				<name><![CDATA[lprooo]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27411</uri>
			</author>
			<updated>2012-02-13T18:04:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56780#p56780</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI переменная edit в sleep]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56778#p56778" />
			<content type="html"><![CDATA[<p>Т.е. чекбокс должен работать как выключатель? Если угадал, то так можно:<br /></p><div class="codebox"><pre><code>
Gui, Add, Edit, x12 y40 w100 h30 vEdit1
Gui, Add, CheckBox, x12 y70 w100 h30 vbox1 gbox1,checkbox1
Gui, Add, CheckBox, x12 y100 w100 h30 , checkbox2
Gui, Add, Radio, x122 y40 w70 h20 , Radio
Gui, Add, Radio, x122 y70 w70 h30 , Radio
Gui, Add, Radio, x122 y110 w70 h20 , Radio
Gui, Add, Radio, x212 y40 w90 h20 , Radio
Gui, Add, Radio, x212 y70 w90 h30 , Radio
Gui, Add, Radio, x212 y110 w90 h20 , Radio
Gui, Add, Text, x12 y10 w100 h30 , sleep
Gui, Add, Text, x122 y10 w70 h30 , text
Gui, Show, x165 y100 h139 w314, prog

CoordMode, Pixel
Return

box1:
    Gui, Submit, NoHide
    If box1 = 1
        SetTimer, getpixel, 100
    Else
        SetTimer, getpixel, Off
Return

getpixel:
   PixelSearch,,, 69, 150, 563, 626, 0x006FFF, 2, FAST
   Gui, Submit, NoHide
   If !ErrorLevel
   {
      SoundPlay, % A_WinDir &quot;\Media\tada.wav&quot;
      Sleep, Edit1 
   }
Return

F6::ExitApp
GuiClose:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2012-02-13T18:02:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56778#p56778</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI переменная edit в sleep]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56777#p56777" />
			<content type="html"><![CDATA[<p>Ага, понятно, вы желаете получить не помощь, а рабочий скрипт. Извините, не интересно <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-02-13T18:00:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56777#p56777</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI переменная edit в sleep]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56776#p56776" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>creature.ws пишет:</cite><blockquote><p>Отлично, по оригиналу — читайте сообщение #13.</p></blockquote></div><p>не работает молчит ...</p>]]></content>
			<author>
				<name><![CDATA[lprooo]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27411</uri>
			</author>
			<updated>2012-02-13T17:57:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56776#p56776</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI переменная edit в sleep]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56775#p56775" />
			<content type="html"><![CDATA[<p>Отлично, по оригиналу — читайте сообщение #13.</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-02-13T17:53:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56775#p56775</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI переменная edit в sleep]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56772#p56772" />
			<content type="html"><![CDATA[<p>ок, вот сам скрипт оригинал<br /></p><div class="codebox"><pre><code>Gui, Add, Edit, x12 y40 w100 h30 vEdit1
Gui, Add, CheckBox, x12 y70 w100 h30 vbox1,checkbox1
Gui, Add, CheckBox, x12 y100 w100 h30 , checkbox2
Gui, Add, Radio, x122 y40 w70 h20 , Radio
Gui, Add, Radio, x122 y70 w70 h30 , Radio
Gui, Add, Radio, x122 y110 w70 h20 , Radio
Gui, Add, Radio, x212 y40 w90 h20 , Radio
Gui, Add, Radio, x212 y70 w90 h30 , Radio
Gui, Add, Radio, x212 y110 w90 h20 , Radio
Gui, Add, Text, x12 y10 w100 h30 , sleep
Gui, Add, Text, x122 y10 w70 h30 , text
Gui, Show, x165 y100 h139 w314, prog
   Gui, Submit, NoHide
if box1 = 1
{
CoordMode, Pixel

SetTimer, getpixel, 100
getpixel:
   PixelSearch,,, 69, 150, 563, 626, 0x006FFF, 2, FAST
    Gui, Submit, NoHide
   If !ErrorLevel
   {
      SoundPlay, % A_WinDir &quot;\Media\tada.wav&quot;
      Sleep, Edit1 
   }
}
   Return
F6::ExitApp
GuiClose:
ExitApp</code></pre></div><p>Если поставить галку в чек бокс 1 то должна начаться выполняться подпрограмма getpixel<br />Если галки нет в чек боксе то getpixel не должен выполняться.</p>]]></content>
			<author>
				<name><![CDATA[lprooo]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27411</uri>
			</author>
			<updated>2012-02-13T17:49:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56772#p56772</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI переменная edit в sleep]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56770#p56770" />
			<content type="html"><![CDATA[<p>Вы бы какой-то один шаблон использовали, а не фрагменты «примеров», запутаться легко ведь.</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-02-13T17:45:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56770#p56770</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI переменная edit в sleep]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56769#p56769" />
			<content type="html"><![CDATA[<p>Опишу подробно на примере :<br />Если в checkbox ставиться галочка то должен начать выполняться этот код<br /></p><div class="codebox"><pre><code>CoordMode, Pixel

SetTimer, cf2, 100
cf2:
   PixelSearch,,, 69, 150, 563, 626, 0x006FFF, 2, FAST
    Gui, Submit, NoHide
   If !ErrorLevel
   {
      SoundPlay, % A_WinDir &quot;\Media\tada.wav&quot;
      Sleep, Edit1
}</code></pre></div><p>если галочку убрать то код должен перестать выполняться.</p>]]></content>
			<author>
				<name><![CDATA[lprooo]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27411</uri>
			</author>
			<updated>2012-02-13T17:42:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56769#p56769</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI переменная edit в sleep]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56766#p56766" />
			<content type="html"><![CDATA[<p>В смысле? Вы чего хотите-то? Опишите задумку.<br />Галке в чекбоксе появиться неоткуда до проверки box1. Так что ничего удивительного.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2012-02-13T17:35:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56766#p56766</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI переменная edit в sleep]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56765#p56765" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
; Добавляем элементы gui
Gui, Add, Edit, x12 y40 w100 h30 vEdit1
Gui, Add, CheckBox, x12 y70 w100 h30 vbox1,checkbox1
Gui, Add, CheckBox, x12 y100 w100 h30 , checkbox2
Gui, Add, Radio, x122 y40 w70 h20 , Radio
Gui, Add, Radio, x122 y70 w70 h30 , Radio
Gui, Add, Radio, x122 y110 w70 h20 , Radio
Gui, Add, Radio, x212 y40 w90 h20 , Radio
Gui, Add, Radio, x212 y70 w90 h30 , Radio
Gui, Add, Radio, x212 y110 w90 h20 , Radio
Gui, Add, Text, x12 y10 w100 h30 , sleep
Gui, Add, Text, x122 y10 w70 h30 , text
Gui, Show, x165 y100 h139 w314, prog
; Сразу после прорисовки окна считываем в соответствующие переменные содержимое|состояние элементов gui
Gui, Submit, NoHide
; Начало блока 1
if box1 = 1
{
    CoordMode, Pixel
    SetTimer, getpixel, 100                         ; Установка таймера. Метка которая активируется по таймеру может находится вне секции автовыполнения
}
; Конец блока 1
; Конец секции автовыполнения
Return
; Метка выполняющаяся по таймеру
getpixel:
    PixelSearch,,, 69, 150, 563, 626, 0x006FFF, 2, FAST
    Gui, Submit, NoHide
    If !ErrorLevel
    {
       SoundPlay, % A_WinDir &quot;\Media\tada.wav&quot;   ; Произвольное действие
       Sleep, %Edit1%                            ; Sleep принимает в качестве параметра число. В данном случае число в переменной Edit1
    }
Return
;Произвольные горячие клавиши и условные метки
F6::
GuiClose:
ExitApp</code></pre></div><p>Выше ваш код с комментариями. Логика работы сохранена <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />Обратите внимание — переменная box1 не равна 1 в момент проверки, т.о. таймер не будет запущен.</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-02-13T17:35:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56765#p56765</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI переменная edit в sleep]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56764#p56764" />
			<content type="html"><![CDATA[<p>msgbox не выдает, так как быть то?Выдает когда переменная равна 0, а когда 1 то не выдает. а нужно чтобы при выставленной галочке выдавал msgbox, а при убранной не выдавал(это на примере этого кода)<br /></p><div class="codebox"><pre><code>Gui, Add, CheckBox,  x12 y70 w100 h30 vcf1,cf 
Gui, Show, x165 y100 h139 w314, prog
 Gui, Submit, NoHide
if cf1 = 0
{
msgbox, text
}
   Return
F6::ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[lprooo]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27411</uri>
			</author>
			<updated>2012-02-13T17:25:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56764#p56764</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI переменная edit в sleep]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56763#p56763" />
			<content type="html"><![CDATA[<p>Не должна запускаться, по идее. Чекбокс ведь не отмечен изначально. Вставьте MsgBox туда и убедитесь.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2012-02-13T17:08:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56763#p56763</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI переменная edit в sleep]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56761#p56761" />
			<content type="html"><![CDATA[<p>запускается без ошибок, но молчит, или вообще не запускает подпрограмму или незнаю.</p>]]></content>
			<author>
				<name><![CDATA[lprooo]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27411</uri>
			</author>
			<updated>2012-02-13T16:58:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56761#p56761</id>
		</entry>
</feed>
