<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Exposed (как в Маке)]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=4964&amp;type=atom" />
	<updated>2010-10-21T10:45:13Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=4964</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Exposed (как в Маке)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=40673#p40673" />
			<content type="html"><![CDATA[<p>Так оно в этом примере, например, чувствительное. Ну, если убрать активацию и раскрытие при клике левой, а оставить, например только среднюю.</p>]]></content>
			<author>
				<name><![CDATA[funtaps]]></name>
			</author>
			<updated>2010-10-21T10:45:13Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=40673#p40673</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Exposed (как в Маке)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=40672#p40672" />
			<content type="html"><![CDATA[<p>Ну, это да. Кстати, насчет затемненного фона - поможет только черное полупрозрачное окно на фоне по типу:<br /></p><div class="codebox"><pre><code>....
gui, +toolwindow -caption
gui, color, 0x000000
gui, show, x0 y0 w%a_screenwidth% h%a_screenheight%, background
winset, transparent, 100, background
....</code></pre></div><p>А вообще интересно сделать все это дело чувствительным к координатам клика и чтоб могло само кликнуть в адекватную точку реального окна даже без его активации.</p>]]></content>
			<author>
				<name><![CDATA[pant-79]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=960</uri>
			</author>
			<updated>2010-10-21T10:31:29Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=40672#p40672</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Exposed (как в Маке)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=40669#p40669" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Недостаток Switcher в ее «задумчивости». На мощном ПК медлительность почти незаметна, но на ноутбуке задержка запуска и рывки анимации уже раздражают. Еще один нюанс — утилита работает только при включенном интерфейсе Aero, так что вам понадобится что-то новее Windows XP.</p></blockquote></div><p>И то, и то - очень плохо=)</p>]]></content>
			<author>
				<name><![CDATA[funtaps]]></name>
			</author>
			<updated>2010-10-21T09:53:44Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=40669#p40669</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Exposed (как в Маке)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=40609#p40609" />
			<content type="html"><![CDATA[<p>Народ, вы зря так надрываетесь<br /><a href="http://www.goldsoftware.ru/switcher">http://www.goldsoftware.ru/switcher</a></p>]]></content>
			<author>
				<name><![CDATA[pant-79]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=960</uri>
			</author>
			<updated>2010-10-20T07:36:24Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=40609#p40609</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Exposed (как в Маке)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=39771#p39771" />
			<content type="html"><![CDATA[<p>Идея, наверное, имеет право на существование, только всё происходит слишком медленно (у меня Windows XP), особенно с восстановлением—минимизацией.<br />Для ускорения советую в начало скрипта добавить</p><div class="codebox"><pre><code>SetWinDelay, 0</code></pre></div><p>а строчку</p><div class="codebox"><pre><code>WinRestore, ahk_id %this_id%</code></pre></div><p>заменить на</p><div class="codebox"><pre><code>WinHide, ahk_id %this_id%
DllCall(&quot;ShowWindow&quot;, UInt, this_id, Int, 9)   ; SW_RESTORE = 9 — восстановление, используется DllCall, т. к. работает и со скрытыми окнами.
WinShow, ahk_id %this_id%</code></pre></div><p>Аналогично с <em>WinMinimize</em>.<br /><a href="http://msdn.microsoft.com/en-us/library/ms633548%28VS.85%29.aspx">ShowWindow Function</a></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2010-09-30T13:38:18Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=39771#p39771</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Exposed (как в Маке)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=39766#p39766" />
			<content type="html"><![CDATA[<p>видимо, у меня Unicode.<br />Кстати, обновлённая версия скрипта, с учётом минимизированных окон:<br /></p><div class="codebox"><pre><code>F8::
if(ExposedOpened=&quot;&quot;) {

    WinGet, id, list,,, Program Manager
    numwin=0

    Loop, %id%
    {
        this_id := id%A_Index%
        WinGetTitle, this_title, ahk_id %this_id%
        if(this_title!=&quot;Пуск&quot;&amp;&amp;this_title!=&quot;Raspisanie&quot;&amp;&amp;this_title!=&quot;Custom Calendar&quot;&amp;&amp;this_title!=&quot;System Controls&quot;&amp;&amp;this_title!=&quot;&quot;&amp;&amp;this_title!=&quot;        QIP        &quot;)
        {
            numwin++
            WinGet, windmin%numwin%, MinMax, ahk_id %this_id%
            WinRestore, ahk_id %this_id%
            WinGetPos, windx%numwin%, windy%numwin%, windw%numwin%, windh%numwin%, ahk_id %this_id%
            wind%numwin%=%this_title%
        }
    }

    if(numwin&gt;1&amp;&amp;numwin&lt;10)
    {
        Loop %numwin%
        {
            if(numwin=2) {
                new_x:=((A_ScreenWidth/2)*(A_Index-1))+10
                new_y:=10
                new_w:=(A_ScreenWidth-30)/2
                new_h:=(A_Screenheight)-20
            }
            if(numwin=3) {
                new_x:=((A_ScreenWidth/3)*(A_Index-1))+10
                new_y:=10
                new_w:=(A_ScreenWidth-40)/3
                new_h:=(A_Screenheight)-20
            }
            if(numwin=4) {
                if(A_Index&lt;3) {
                    new_x:=((A_ScreenWidth/2)*(A_Index-1))+10
                    new_y:=10
                }
                else{
                    new_x:=((A_ScreenWidth/2)*(A_Index-3))+10
                    new_y:=(A_Screenheight/2)+10
                }
                new_w:=(A_ScreenWidth-30)/2
                new_h:=(A_Screenheight-30)/2
            }
            if(numwin=5||numwin=6) {
                if(A_Index&lt;4) {
                    new_x:=((A_ScreenWidth/3)*(A_Index-1))+10
                    new_y:=10
                }
                else{
                    new_x:=((A_ScreenWidth/3)*(A_Index-4))+10
                    new_y:=(A_Screenheight/2)+10
                }
                new_w:=(A_ScreenWidth-40)/3
                new_h:=(A_Screenheight-30)/2
            }
            if(numwin=7||numwin=8||numwin=9) {
                if(A_Index&lt;4) {
                    new_x:=((A_ScreenWidth/3)*(A_Index-1))+10
                    new_y:=10
                }
                else if(A_Index&lt;7) {
                    new_x:=((A_ScreenWidth/3)*(A_Index-4))+10
                    new_y:=(A_Screenheight/3)+10
                }
                else{
                    new_x:=((A_ScreenWidth/3)*(A_Index-7))+10
                    new_y:=((A_Screenheight/3)*2)+10
                }
                new_w:=(A_ScreenWidth-40)/3
                new_h:=(A_Screenheight-40)/3
            }

            if(windw%A_Index%&lt;new_w)
                new_w:=windw%A_Index%
            if(windh%A_Index%&lt;new_h)
                new_h:=windh%A_Index%

            the_t:=wind%A_Index%
            WinMove, %the_t%, , new_x, new_y , new_w, new_h
        }
        ExposedOpened:=&quot;yes&quot;
        Hotkey, MButton, ChooseTheWindow, On
        Hotkey, LButton, ChooseTheWindow, On
        Hotkey, RButton, ChooseTheWindow, On
    }
}
else{
    Loop %numwin%
    {

        the_t:=wind%A_Index%
        WinMove, %the_t%, , windx%A_Index%, windy%A_Index%, windw%A_Index%, windh%A_Index%

        if(windmin%A_Index%=1)
            WinMaximize, %the_t%
        else if(windmin%A_Index%=-1)
            WinMinimize, %the_t%

    }
    ExposedOpened:=&quot;&quot;
    Hotkey, MButton, ChooseTheWindow, Off
    Hotkey, LButton, ChooseTheWindow, Off
    Hotkey, RButton, ChooseTheWindow, Off
}
return

ChooseTheWindow:
MouseGetPos, , , the_win_id 
Send, {F8}
WinActivate, ahk_id %the_win_id%
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[funtaps]]></name>
			</author>
			<updated>2010-09-30T08:28:17Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=39766#p39766</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Exposed (как в Маке)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=39761#p39761" />
			<content type="html"><![CDATA[<p>У меня стоят оба и плюс ещё обычный. Просто зарегистрировал для них разные расширения файлов. Проблему с &quot;я&quot; я докладывал <strong>Lexikos</strong>&#039;у, уже довольно давно (<a href="http://www.autohotkey.com/forum/post-359247.html#359247">здесь</a>), но он отреагировал вяло и исправлять не стал. Она ещё проявляется при чтении/записи файлов, что делает использование ANSI-билда для русских вообще бессмысленным.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2010-09-30T04:32:19Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=39761#p39761</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Exposed (как в Маке)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=39760#p39760" />
			<content type="html"><![CDATA[<p>А у тебя какая версия — ANSI или Unicode?<br />Дело в том, что у ANSI-версии есть такой странный баг (по-крайней мере у меня): она букву &quot;я&quot; воспринимает как перевод строки, т. е. результатом скрипта<br /></p><div class="codebox"><pre><code>MsgBox, яMsgBox</code></pre></div><p>будет два последовательно появляющихся окна MsgBox, а скрипт<br /></p><div class="codebox"><pre><code>; я хакер
MsgBox</code></pre></div><p>вообще вообще отказывается выполнять:<br /></p><div class="quotebox"><blockquote><p>Error at line 2.</p><p>Line Text: хакер<br />Error: This line does not contain a recognized action.</p><p>The program will exit.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2010-09-29T22:47:07Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=39760#p39760</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Exposed (как в Маке)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=39650#p39650" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>У меня не самый новый.</p></blockquote></div><p>У меня тоже не новый был, на нём работало без пробелов. Потом обновил до последнего — всё равно работает. Где-то в промежутке, видимо, появлялось такое ограничение. Думаю, что строго говоря, это был баг. Так что срочно обновляйся. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2010-09-25T02:02:34Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=39650#p39650</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Exposed (как в Маке)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=39649#p39649" />
			<content type="html"><![CDATA[<p><a href="http://www.script-coding.com/AutoHotkey/WinGet.html">Можно</a>:<br /> </p><div class="codebox"><pre><code>WinGet, Var, MinMax, WinTitle</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2010-09-24T18:50:16Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=39649#p39649</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Exposed (как в Маке)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=39648#p39648" />
			<content type="html"><![CDATA[<p>Да, действительно. Привык писать на си. даже не задумывался в этом месте.<br />А всё-таки, можно ли как-то опознать минимизированность окна, чтобы потом его вернуть в то же состояние?</p>]]></content>
			<author>
				<name><![CDATA[funtaps]]></name>
			</author>
			<updated>2010-09-24T18:47:25Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=39648#p39648</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Exposed (как в Маке)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=39644#p39644" />
			<content type="html"><![CDATA[<p>У меня не самый новый. А &quot;==&quot; у меня тоже работает, но одно &quot;=&quot; лишнее! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2010-09-24T16:56:11Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=39644#p39644</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Exposed (как в Маке)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=39638#p39638" />
			<content type="html"><![CDATA[<p>Не знаю. Сейчас проверил на новейшем AHK_L, тоже нет ошибки. Кстати, == у меня тоже везде работает нормально.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2010-09-24T15:03:36Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=39638#p39638</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Exposed (как в Маке)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=39635#p39635" />
			<content type="html"><![CDATA[<p>Да, у меня AHK_L стоит, в обычном не выдаёт, видимо. Ну всё равно, с пробелами лучше читается!</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2010-09-24T13:14:37Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=39635#p39635</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Exposed (как в Маке)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=39634#p39634" />
			<content type="html"><![CDATA[<p>Ошибки без пробелов? Никогда не наблюдал такого.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2010-09-24T13:07:18Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=39634#p39634</id>
		</entry>
</feed>
