<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK:Открываем Edit Script, двойным нажатием ПКМ]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=8499&amp;type=atom" />
	<updated>2013-08-01T20:48:48Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8499</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Открываем Edit Script, двойным нажатием ПКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=74174#p74174" />
			<content type="html"><![CDATA[<p>большое спасибо всё работает</p>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2013-08-01T20:48:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=74174#p74174</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Открываем Edit Script, двойным нажатием ПКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=73998#p73998" />
			<content type="html"><![CDATA[<p>Спасибо,помогли.</p>]]></content>
			<author>
				<name><![CDATA[pr9n]]></name>
			</author>
			<updated>2013-07-23T00:41:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=73998#p73998</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Открываем Edit Script, двойным нажатием ПКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=73991#p73991" />
			<content type="html"><![CDATA[<p>Ну я же неговорю что это готовое решение. Я пнул в нужную сторону как попросили, дальше хозяин - барин. Идея с двойным нажатием ПКМ мне самому ненравится, но тут уж дело вкусов.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-07-22T14:17:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=73991#p73991</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Открываем Edit Script, двойным нажатием ПКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=73989#p73989" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong>, не надо так <img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" />. Во-первых, контекстное меню мелькает, во-вторых, теряется функциональность правой кнопки — становится невозможным перемещать ею объекты. Должна же быть всё-таки какая-то культура программирования!</p><p>Задачу считаю не имеющей смысла. Неужели трудно кликнуть правой кнопкой и выбрать соответствующий пункт из контекстного меню?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2013-07-22T13:52:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=73989#p73989</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Открываем Edit Script, двойным нажатием ПКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=73988#p73988" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
#If WinActive(&quot;ahk_exe explorer.exe&quot;) 
RButton:: 
    If !Double
    {
        Double := 1
        SetTimer, Double, -200 
        SendInput % &quot;{&quot; A_ThisHotkey &quot;}&quot;
        return
    }
    WinClose ahk_class #32768 ahk_exe explorer.exe
    If (path := Explorer_GetSel()) &amp;&amp; (RegExMatch(path, &quot;i)\.ahk$&quot;)) 
        Run C:\Program Files (x86)\Notepad++\notepad++.exe %path% 
        ; Run, edit &quot;%path%&quot;
    Else
        SendInput % &quot;{&quot; A_ThisHotkey &quot;}&quot;
Double:
    Double := 0
    return 
#If


    
Explorer_GetSel()
{
    if !(window := Explorer_GetWindow())
        return &quot;&quot;
    if (window=&quot;desktop&quot;)
    {
        ControlGet, hwWindow, HWND,, SysListView321, ahk_class Progman
        if !hwWindow  
            ControlGet, hwWindow, HWND,, SysListView321, A
        ControlGet, files, List, % &quot;Selected Col1&quot;,, ahk_id %hwWindow%
        base := SubStr(A_Desktop,0,1)==&quot;\&quot; ? SubStr(A_Desktop,1,-1) : A_Desktop
        Loop, Parse, files, `n, `r
        {
            path := base &quot;\&quot; A_LoopField
            IfExist %path%  
                ret .= path &quot;`n&quot;
        }
    }
    else
    {
        collection := window.document.SelectedItems 
        for item in collection
            ret .= item.path &quot;`n&quot;
    }
    return Trim(ret,&quot;`n&quot;)
}

Explorer_GetWindow()
{  
    WinGetClass class, % &quot;ahk_id&quot; hwnd := WinExist(&quot;A&quot;) 
    if (class ~= &quot;(Cabinet|Explore)WClass&quot;)
    {
        for window in ComObjCreate(&quot;Shell.Application&quot;).Windows
            if (window.hwnd==hwnd)
                return window
    }
    else if (class ~= &quot;Progman|WorkerW&quot;) 
        return &quot;desktop&quot;  
}
</code></pre></div><p>Немного изменённые функции, взяты здесь - <a href="http://www.autohotkey.com/board/topic/60985-get-paths-of-selected-items-in-an-explorer-window/">Get paths of selected items in an explorer window</a></p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-07-22T12:10:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=73988#p73988</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK:Открываем Edit Script, двойным нажатием ПКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=73969#p73969" />
			<content type="html"><![CDATA[<p>Доброго времени суток. Помогите составить скрипт.Задумка такая, при двойном нажатии&nbsp; правой кнопкой мыши на файл ahk, он открывается в редакторе скрипта (Edit Script)</p>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2013-07-22T01:20:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=73969#p73969</id>
		</entry>
</feed>
