<?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=8047&amp;type=atom" />
	<updated>2013-02-07T20:28:07Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8047</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Взаимодейтсвия GUI со скриптом.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69240#p69240" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>creature.ws пишет:</cite><blockquote><div class="quotebox"><blockquote><p>Или делали меню через SmartGUI?</p></blockquote></div><p>Меню?&nbsp; Нет там меню <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /><a href="http://www.script-coding.com/AutoHotkey/GUI.html#controls">GUI</a> — Прочитайте про относительные координаты элементов окна, <em>xm xs x+n</em> и прочие, SmartGUI станет бесполезен как только вы свыкнетесь с принятым способом «создания GUI».</p></blockquote></div><p>Спасибо, вы мне очень помогли!</p>]]></content>
			<author>
				<name><![CDATA[Meow Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29546</uri>
			</author>
			<updated>2013-02-07T20:28:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69240#p69240</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Взаимодейтсвия GUI со скриптом.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69188#p69188" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Или делали меню через SmartGUI?</p></blockquote></div><p>Меню?&nbsp; Нет там меню <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /><a href="http://www.script-coding.com/AutoHotkey/GUI.html#controls">GUI</a> — Прочитайте про относительные координаты элементов окна, <em>xm xs x+n</em> и прочие, SmartGUI станет бесполезен как только вы свыкнетесь с принятым способом «создания GUI».</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2013-02-06T22:32:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69188#p69188</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Взаимодейтсвия GUI со скриптом.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69184#p69184" />
			<content type="html"><![CDATA[<p>creature.ws<br />спасибо - это оно.<br />Вы её писали собственноручно? Или делали меню через SmartGUI?</p>]]></content>
			<author>
				<name><![CDATA[Meow Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29546</uri>
			</author>
			<updated>2013-02-06T21:13:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69184#p69184</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Взаимодейтсвия GUI со скриптом.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69178#p69178" />
			<content type="html"><![CDATA[<p>Еще один пример:<br /></p><div class="codebox"><pre><code>Gui, MainWindow: Margin, 10, 10
Gui, MainWindow: Add, text,, Введите текст:
Gui, MainWindow: Add, Edit, w250 vtext, Куплю шмот на дк не точенный{enter}
Gui, MainWindow: Add, text,, частота:
Gui, MainWindow: Add, Edit, x+5 w25 vfrequency limit3 number, 10
Gui, MainWindow: Add, text, x+5, сек
Gui, MainWindow: Add, Button, x+5 gStart, Старт
Gui, MainWindow: Add, Button, x+5 gPause, Пауза
Gui, MainWindow: Show
return

MainWindowGUIClose:
    ExitApp

Start:
    Gui, MainWindow: Submit, nohide
    SetTimer, SendText, % frequency * 1000
    return

Pause:
    SetTimer, SendText, Off
    return

SendText:
    SendInput %text%
    return</code></pre></div><p>И ещё один:<br /></p><div class="codebox"><pre><code>Gui, Margin, 20, 12
Gui, Add, Text,, Введите текст:
Gui, Add, Edit, w210 vtext
Gui, Add, Text,, частота:
Gui, Add, Edit, x+6 w25 vfrequency limit3 number -wrap, 10
Gui, Add, Text, x+6, сек
Gui, Add, Button, x+6 w51 gStart, Старт
Gui, Add, Button, x+6 w51 gPause, Пауза
Gui, Add, Checkbox, xm gToggleAdvSettingsWindow HWNDHWNDcheckbox, расширенные настройки
Gui, +HWNDHWNDmain
Gui, Show, Hide

VarSetCapacity(rect, 16)
DllCall(&quot;GetClientRect&quot;, &quot;Ptr&quot;, HWNDmain, &quot;Ptr&quot;, &amp;rect)
clientH := NumGet(rect, 12, &quot;Int&quot;)

Gui, Add, Text, y+20, Введите заголовок окна:
Gui, Add, Edit, w210 vwinTitle
Gui, Add, Radio, vsendtoActive Checked, отправлять текст если окно активно
Gui, Add, Radio, vsendtoMinimized, отправлять текст в неактивное окно
Gui, Show, h%clientH%
return

GUIClose:
    ExitApp

Start:
    Gui, Submit, nohide

    if (useAdvSettings &amp;&amp; !winTitle)
        errorMessage .= &quot;Введите заголовок окна в которое следует отправлять текст, либо отключите расширенные настройки`n`n&quot;

    if !text
        errorMessage .= &quot;Введите текст`n`n&quot;

    if !frequency
        errorMessage .= &quot;Укажите требуемую частоту отправки`n`n&quot;

    if (errorMessage) {
        MsgBox, 16,, %errorMessage%, 5
        errorMessage := &quot;&quot;
        return
    }

    SetTimer, SendText, % frequency * 1000
    SoundPlay, *48
    return

Pause:
    SetTimer, SendText, Off
    SoundPlay, *64
    return

SendText:
    if (useAdvSettings) {
        if (sendtoMinimized &amp;&amp; WinExist(winTitle))
            ControlSend,, %text%
        else if (sendtoActive &amp;&amp; WinActive(winTitle))
            SendInput %text%
    }
    else SendInput %text%
    return

ToggleAdvSettingsWindow:
    ControlGet, useAdvSettings, Checked,,, ahk_id %HWNDcheckbox%
    Gui, Show, % useAdvSettings? &quot;Autosize&quot; : &quot;h&quot; . clientH
    return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2013-02-06T19:01:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69178#p69178</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Взаимодейтсвия GUI со скриптом.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69176#p69176" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Enter::
Repeat:
   ++itr
   InputBox, outputVar
           , % &quot;Some title&quot;
           , % &quot;      set &quot;(itr=1 ? &quot;text&quot;:&quot;rate&quot;)&quot; (step: &quot;itr &quot;)&quot;
           ,
           , 175
           , 120
           , A_ScreenWidth/2-87
           , A_ScreenHeight/2-60
           ,
           ,
           , % &quot;Input &quot;(itr=1 ? &quot;anything&quot;:&quot;digits only&quot;)&quot; here&quot;
   If ErrorLevel
   {
      itr:=&quot;&quot;
      SetTimer, SomeLabel, Off
      Return
   }
   If (itr=2 And Not outputVar~=&quot;^[0-9]*\.?[0-9]+$&quot;)
   {
      --itr
      Goto, Repeat
   }
   `(itr=1 ? content:=outputVar:rate:=outputVar)
   Goto, % itr=1 ? &quot;Repeat&quot;:&quot;Continue&quot;
Continue:
   itr:=&quot;&quot;
   SetTimer, SomeLabel, % rate
   Return

SomeLabel:
   MsgBox, 262144, % A_Space, % &quot;content:`n&quot;content &quot;`n`nrate: &quot;rate, % 0.5
;    Send, % content &quot;{Enter}&quot;
   Return

~Esc::
   KeyWait, Esc
   If A_TimeSinceThisHotkey&gt;300
      ExitApp
   Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2013-02-06T17:43:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69176#p69176</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Взаимодейтсвия GUI со скриптом.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69173#p69173" />
			<content type="html"><![CDATA[<p>Та картинка которую я привел в пример, я сделал в фотошопе.<br />Сам код есть но он просто запускается и всё, я хочу его одаптировать под GUI<br /></p><div class="codebox"><pre><code>HotKey, F1, spam,
spam:

Loop 
{
    {
        Send Куплю шмот на дк не точенный{enter}
        Sleep, 10000
    }
}
    return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Meow Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29546</uri>
			</author>
			<updated>2013-02-06T16:21:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69173#p69173</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Взаимодейтсвия GUI со скриптом.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69147#p69147" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>как сделать включение и отключение программы</p></blockquote></div><p>Для отключения программы можно воспользоваться этим замечательным красным крестиком в правом верхнем углу окна отображенного на приложенном изображении.<br />Соответственно, для включения уместно воспользоваться двойным кликом по исполняемому файлу программы.</p><p>Вы имели в виду что-то иное? Конкретизируйте.</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2013-02-06T03:47:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69147#p69147</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Взаимодейтсвия GUI со скриптом.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=69130#p69130" />
			<content type="html"><![CDATA[<p>Добрый вечер, в деле я новичок, решил написать программу которая будет спамить сообщениями каждые 10 секунд, её я сделал. Проблема возникла - как сделать включение и отключение программы? Не полной паузы, а что бы потом можно было нажать на ту же кнопку и скрипт возобновилася.<br />Решил пойти другим путем и сделать приятнее на вид скрипт.<br />Хочу использовать GUI меню что бы выглядело примерно так:<br /><span class="postimg"><img src="http://i51.fastpic.ru/big/2013/0205/c3/ad1819e4a5ec5a95b9f2a2c26080ccc3.jpg" alt="http://i51.fastpic.ru/big/2013/0205/c3/ad1819e4a5ec5a95b9f2a2c26080ccc3.jpg" /></span></p>]]></content>
			<author>
				<name><![CDATA[Meow Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29546</uri>
			</author>
			<updated>2013-02-05T17:34:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=69130#p69130</id>
		</entry>
</feed>
