<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Восстановление Notepad++ в качестве прогр. по умолч. для ahk файл]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=12059</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12059&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Восстановление Notepad++ в качестве прогр. по умолч. для ahk файл».]]></description>
		<lastBuildDate>Tue, 04 Oct 2016 15:44:02 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Восстановление Notepad++ в качестве прогр. по умолч. для ahk файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=108211#p108211</link>
			<description><![CDATA[<p><strong>Malcev</strong><br />У меня Win7 и на другие переходить не хочу по ряду причин.<br />Ключ HKCR\.ahk\(По умолчанию)=ahk_auto_file, не помню почему, может, с древней установки.<br />Устанавливать/распаковывать - не суть важно.</p>]]></description>
			<author><![CDATA[null@example.com (Flasher)]]></author>
			<pubDate>Tue, 04 Oct 2016 15:44:02 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=108211#p108211</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Восстановление Notepad++ в качестве прогр. по умолч. для ahk файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=108203#p108203</link>
			<description><![CDATA[<p><strong>Flasher</strong>, ваш reg файл у меня на Win7 не работает.<br />У меня нету ahk_auto_file. Он только на Win10?<br />Работает так:<br /></p><div class="codebox"><pre><code>Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Edit\Command]
@=&quot;C:\\Program Files\\Notepad++\\notepad++.exe %1&quot;</code></pre></div><p>И кстати, программу устанавливать не надо.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 04 Oct 2016 11:37:20 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=108203#p108203</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Восстановление Notepad++ в качестве прогр. по умолч. для ahk файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=108202#p108202</link>
			<description><![CDATA[<p>Ну, да. Сохранить и запустить .reg с исправленным путём сложнее, чем устанавливать программу и проделывать описанные манипуляции? <img src="//forum.script-coding.com/img/smilies/hmm.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (Flasher)]]></author>
			<pubDate>Tue, 04 Oct 2016 11:09:54 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=108202#p108202</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Восстановление Notepad++ в качестве прогр. по умолч. для ahk файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=108197#p108197</link>
			<description><![CDATA[<p>Malcev, спасибо! Заработало. Ваш способ показался самым простым.</p>]]></description>
			<author><![CDATA[null@example.com (Maxim)]]></author>
			<pubDate>Tue, 04 Oct 2016 05:36:33 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=108197#p108197</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Восстановление Notepad++ в качестве прогр. по умолч. для ahk файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=108195#p108195</link>
			<description><![CDATA[<p>Вот хорошая утилита:<br /><a href="http://www.nirsoft.net/utils/file_types_manager.html">http://www.nirsoft.net/utils/file_types_manager.html</a><br />Запускаете, ищете расширение ahk.<br />Внизу смотрите есть ли Имя Edit.<br />Если нету нажимаете actions-&gt;new action.<br />Если же есть просто кликаете на него 2 раза.<br />В Action Name - вписываете edit.<br />Потом Browse и выбираете путь до ноутпада.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Mon, 03 Oct 2016 20:57:02 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=108195#p108195</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Восстановление Notepad++ в качестве прогр. по умолч. для ahk файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=108194#p108194</link>
			<description><![CDATA[<p>О чём я и написал.<br />Используйте приведённый .reg, только путь к программе верный укажите с учётом сдвоенного бэкслеша.</p>]]></description>
			<author><![CDATA[null@example.com (Flasher)]]></author>
			<pubDate>Mon, 03 Oct 2016 19:45:03 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=108194#p108194</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Восстановление Notepad++ в качестве прогр. по умолч. для ahk файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=108193#p108193</link>
			<description><![CDATA[<p>Выскажусь более четко. Самое главное, что мне необходимо — это чтобы после нажатия «Edit this script» запущенный файл открывался в Notepad++.</p>]]></description>
			<author><![CDATA[null@example.com (Maxim)]]></author>
			<pubDate>Mon, 03 Oct 2016 19:36:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=108193#p108193</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Восстановление Notepad++ в качестве прогр. по умолч. для ahk файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=108192#p108192</link>
			<description><![CDATA[<p>Я так пониманию, нужно редактировать по &quot;Изменить&quot; в контекстном меню.<br />Запуск скриптов только по комстроке с интерпретатором вряд ли подразумевался.<br /></p><div class="codebox"><pre><code>Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ahk_auto_file\Shell\Edit\Command]
@=&quot;C:\\Program Files\\Notepad++\\notepad++.exe %1&quot;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Flasher)]]></author>
			<pubDate>Mon, 03 Oct 2016 19:24:41 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=108192#p108192</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Восстановление Notepad++ в качестве прогр. по умолч. для ahk файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=108191#p108191</link>
			<description><![CDATA[<p>А как же ПКМ --&gt; Открыть с помощью... --&gt; выбрать &quot;Notepad++&quot; --&gt; поставить галочку &quot;всегда использовать для файлов этого типа&quot;?</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Mon, 03 Oct 2016 19:14:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=108191#p108191</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Восстановление Notepad++ в качестве прогр. по умолч. для ahk файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=108190#p108190</link>
			<description><![CDATA[<p>Уважаемые форумчане до перехода с Windows 8 на 10 мои akh файлы по умолчанию открывались в Notepad++.<br />Я хочу, чтобы и в&nbsp; Windows 10 akh файлы открывались по умолчанию в Notepad++.<br />Пожалуйста, подскажите как это сделать. Обучающее видео https://www.youtube.com/watch?v=QKJfISxjzF4 не помогло.</p><br /><p>Вот здесь C:\Program Files\AutoHotkey\Lib у меня живет следующий скрипт, может быть необходимо что-то поменять в нем?</p><div class="codebox"><pre><code>Acc_Init()
{
	Static	h
	If Not	h
		h:=DllCall(&quot;LoadLibrary&quot;,&quot;Str&quot;,&quot;oleacc&quot;,&quot;Ptr&quot;)
}
Acc_ObjectFromEvent(ByRef _idChild_, hWnd, idObject, idChild)
{
	Acc_Init()
	If	DllCall(&quot;oleacc\AccessibleObjectFromEvent&quot;, &quot;Ptr&quot;, hWnd, &quot;UInt&quot;, idObject, &quot;UInt&quot;, idChild, &quot;Ptr*&quot;, pacc, &quot;Ptr&quot;, VarSetCapacity(varChild,8+2*A_PtrSize,0)*0+&amp;varChild)=0
	Return	ComObjEnwrap(9,pacc,1), _idChild_:=NumGet(varChild,8,&quot;UInt&quot;)
}

Acc_ObjectFromPoint(ByRef _idChild_ = &quot;&quot;, x = &quot;&quot;, y = &quot;&quot;)
{
	Acc_Init()
	If	DllCall(&quot;oleacc\AccessibleObjectFromPoint&quot;, &quot;Int64&quot;, x==&quot;&quot;||y==&quot;&quot;?0*DllCall(&quot;GetCursorPos&quot;,&quot;Int64*&quot;,pt)+pt:x&amp;0xFFFFFFFF|y&lt;&lt;32, &quot;Ptr*&quot;, pacc, &quot;Ptr&quot;, VarSetCapacity(varChild,8+2*A_PtrSize,0)*0+&amp;varChild)=0
	Return	ComObjEnwrap(9,pacc,1), _idChild_:=NumGet(varChild,8,&quot;UInt&quot;)
}

Acc_ObjectFromWindow(hWnd, idObject = 0)
{
	Acc_Init()
	If	DllCall(&quot;oleacc\AccessibleObjectFromWindow&quot;, &quot;Ptr&quot;, hWnd, &quot;UInt&quot;, idObject&amp;=0xFFFFFFFF, &quot;Ptr&quot;, -VarSetCapacity(IID,16)+NumPut(idObject==0xFFFFFFF0?0x46000000000000C0:0x719B3800AA000C81,NumPut(idObject==0xFFFFFFF0?0x0000000000020400:0x11CF3C3D618736E0,IID,&quot;Int64&quot;),&quot;Int64&quot;), &quot;Ptr*&quot;, pacc)=0
	Return	ComObjEnwrap(9,pacc,1)
}

Acc_WindowFromObject(pacc)
{
	If	DllCall(&quot;oleacc\WindowFromAccessibleObject&quot;, &quot;Ptr&quot;, IsObject(pacc)?ComObjValue(pacc):pacc, &quot;Ptr*&quot;, hWnd)=0
	Return	hWnd
}

Acc_GetRoleText(nRole)
{
	nSize := DllCall(&quot;oleacc\GetRoleText&quot;, &quot;Uint&quot;, nRole, &quot;Ptr&quot;, 0, &quot;Uint&quot;, 0)
	VarSetCapacity(sRole, (A_IsUnicode?2:1)*nSize)
	DllCall(&quot;oleacc\GetRoleText&quot;, &quot;Uint&quot;, nRole, &quot;str&quot;, sRole, &quot;Uint&quot;, nSize+1)
	Return	sRole
}

Acc_GetStateText(nState)
{
	nSize := DllCall(&quot;oleacc\GetStateText&quot;, &quot;Uint&quot;, nState, &quot;Ptr&quot;, 0, &quot;Uint&quot;, 0)
	VarSetCapacity(sState, (A_IsUnicode?2:1)*nSize)
	DllCall(&quot;oleacc\GetStateText&quot;, &quot;Uint&quot;, nState, &quot;str&quot;, sState, &quot;Uint&quot;, nSize+1)
	Return	sState
}

Acc_SetWinEventHook(eventMin, eventMax, pCallback)
{
	Return	DllCall(&quot;SetWinEventHook&quot;, &quot;Uint&quot;, eventMin, &quot;Uint&quot;, eventMax, &quot;Uint&quot;, 0, &quot;Ptr&quot;, pCallback, &quot;Uint&quot;, 0, &quot;Uint&quot;, 0, &quot;Uint&quot;, 0)
}

Acc_UnhookWinEvent(hHook)
{
	Return	DllCall(&quot;UnhookWinEvent&quot;, &quot;Ptr&quot;, hHook)
}
/*	Win Events:

	pCallback := RegisterCallback(&quot;WinEventProc&quot;)
	WinEventProc(hHook, event, hWnd, idObject, idChild, eventThread, eventTime)
	{
		Critical
		Acc := Acc_ObjectFromEvent(_idChild_, hWnd, idObject, idChild)
		; Code Here:

	}
*/

; Written by jethrow
Acc_Role(Acc, ChildId=0) {
	try return ComObjType(Acc,&quot;Name&quot;)=&quot;IAccessible&quot;?Acc_GetRoleText(Acc.accRole(ChildId)):&quot;invalid object&quot;
}
Acc_State(Acc, ChildId=0) {
	try return ComObjType(Acc,&quot;Name&quot;)=&quot;IAccessible&quot;?Acc_GetStateText(Acc.accState(ChildId)):&quot;invalid object&quot;
}
Acc_Location(Acc, ChildId=0, byref Position=&quot;&quot;) { ; adapted from Sean&#039;s code
	try Acc.accLocation(ComObj(0x4003,&amp;x:=0), ComObj(0x4003,&amp;y:=0), ComObj(0x4003,&amp;w:=0), ComObj(0x4003,&amp;h:=0), ChildId)
	catch
		return
	Position := &quot;x&quot; NumGet(x,0,&quot;int&quot;) &quot; y&quot; NumGet(y,0,&quot;int&quot;) &quot; w&quot; NumGet(w,0,&quot;int&quot;) &quot; h&quot; NumGet(h,0,&quot;int&quot;)
	return	{x:NumGet(x,0,&quot;int&quot;), y:NumGet(y,0,&quot;int&quot;), w:NumGet(w,0,&quot;int&quot;), h:NumGet(h,0,&quot;int&quot;)}
}
Acc_Parent(Acc) { 
	try parent:=Acc.accParent
	return parent?Acc_Query(parent):
}
Acc_Child(Acc, ChildId=0) {
	try child:=Acc.accChild(ChildId)
	return child?Acc_Query(child):
}
Acc_Query(Acc) { ; thanks Lexikos - www.autohotkey.com/forum/viewtopic.php?t=81731&amp;p=509530#509530
	try return ComObj(9, ComObjQuery(Acc,&quot;{618736e0-3c3d-11cf-810c-00aa00389b71}&quot;), 1)
}
Acc_Error(p=&quot;&quot;) {
	static setting:=0
	return p=&quot;&quot;?setting:setting:=p
}
Acc_Children(Acc) {
	if ComObjType(Acc,&quot;Name&quot;) != &quot;IAccessible&quot;
		ErrorLevel := &quot;Invalid IAccessible Object&quot;
	else {
		Acc_Init(), cChildren:=Acc.accChildCount, Children:=[]
		if DllCall(&quot;oleacc\AccessibleChildren&quot;, &quot;Ptr&quot;,ComObjValue(Acc), &quot;Int&quot;,0, &quot;Int&quot;,cChildren, &quot;Ptr&quot;,VarSetCapacity(varChildren,cChildren*(8+2*A_PtrSize),0)*0+&amp;varChildren, &quot;Int*&quot;,cChildren)=0 {
			Loop %cChildren%
				i:=(A_Index-1)*(A_PtrSize*2+8)+8, child:=NumGet(varChildren,i), Children.Insert(NumGet(varChildren,i-8)=9?Acc_Query(child):child), NumGet(varChildren,i-8)=9?ObjRelease(child):
			return Children.MaxIndex()?Children:
		} else
			ErrorLevel := &quot;AccessibleChildren DllCall Failed&quot;
	}
	if Acc_Error()
		throw Exception(ErrorLevel,-1)
}
Acc_ChildrenByRole(Acc, Role) {
	if ComObjType(Acc,&quot;Name&quot;)!=&quot;IAccessible&quot;
		ErrorLevel := &quot;Invalid IAccessible Object&quot;
	else {
		Acc_Init(), cChildren:=Acc.accChildCount, Children:=[]
		if DllCall(&quot;oleacc\AccessibleChildren&quot;, &quot;Ptr&quot;,ComObjValue(Acc), &quot;Int&quot;,0, &quot;Int&quot;,cChildren, &quot;Ptr&quot;,VarSetCapacity(varChildren,cChildren*(8+2*A_PtrSize),0)*0+&amp;varChildren, &quot;Int*&quot;,cChildren)=0 {
			Loop %cChildren% {
				i:=(A_Index-1)*(A_PtrSize*2+8)+8, child:=NumGet(varChildren,i)
				if NumGet(varChildren,i-8)=9
					AccChild:=Acc_Query(child), ObjRelease(child), Acc_Role(AccChild)=Role?Children.Insert(AccChild):
				else
					Acc_Role(Acc, child)=Role?Children.Insert(child):
			}
			return Children.MaxIndex()?Children:, ErrorLevel:=0
		} else
			ErrorLevel := &quot;AccessibleChildren DllCall Failed&quot;
	}
	if Acc_Error()
		throw Exception(ErrorLevel,-1)
}
Acc_Get(Cmd, ChildPath=&quot;&quot;, ChildID=0, WinTitle=&quot;&quot;, WinText=&quot;&quot;, ExcludeTitle=&quot;&quot;, ExcludeText=&quot;&quot;) {
	static properties := {Action:&quot;DefaultAction&quot;, DoAction:&quot;DoDefaultAction&quot;, Keyboard:&quot;KeyboardShortcut&quot;}
	AccObj :=   IsObject(WinTitle)? WinTitle
			:   Acc_ObjectFromWindow( WinExist(WinTitle, WinText, ExcludeTitle, ExcludeText), 0 )
	if ComObjType(AccObj, &quot;Name&quot;) != &quot;IAccessible&quot;
		ErrorLevel := &quot;Could not access an IAccessible Object&quot;
	else {
		StringReplace, ChildPath, ChildPath, _, %A_Space%, All
		AccError:=Acc_Error(), Acc_Error(true)
		Loop Parse, ChildPath, ., %A_Space%
			try {
				if A_LoopField is digit
					Children:=Acc_Children(AccObj), m2:=A_LoopField ; mimic &quot;m2&quot; output in else-statement
				else
					RegExMatch(A_LoopField, &quot;(\D*)(\d*)&quot;, m), Children:=Acc_ChildrenByRole(AccObj, m1), m2:=(m2?m2:1)
				if Not Children.HasKey(m2)
					throw
				AccObj := Children[m2]
			} catch {
				ErrorLevel:=&quot;Cannot access ChildPath Item #&quot; A_Index &quot; -&gt; &quot; A_LoopField, Acc_Error(AccError)
				if Acc_Error()
					throw Exception(&quot;Cannot access ChildPath Item&quot;, -1, &quot;Item #&quot; A_Index &quot; -&gt; &quot; A_LoopField)
				return
			}
		Acc_Error(AccError)
		StringReplace, Cmd, Cmd, %A_Space%, , All
		properties.HasKey(Cmd)? Cmd:=properties[Cmd]:
		try {
			if (Cmd = &quot;Location&quot;)
				AccObj.accLocation(ComObj(0x4003,&amp;x:=0), ComObj(0x4003,&amp;y:=0), ComObj(0x4003,&amp;w:=0), ComObj(0x4003,&amp;h:=0), ChildId)
			  , ret_val := &quot;x&quot; NumGet(x,0,&quot;int&quot;) &quot; y&quot; NumGet(y,0,&quot;int&quot;) &quot; w&quot; NumGet(w,0,&quot;int&quot;) &quot; h&quot; NumGet(h,0,&quot;int&quot;)
			else if (Cmd = &quot;Object&quot;)
				ret_val := AccObj
			else if Cmd in Role,State
				ret_val := Acc_%Cmd%(AccObj, ChildID+0)
			else if Cmd in ChildCount,Selection,Focus
				ret_val := AccObj[&quot;acc&quot; Cmd]
			else
				ret_val := AccObj[&quot;acc&quot; Cmd](ChildID+0)
		} catch {
			ErrorLevel := &quot;&quot;&quot;&quot; Cmd &quot;&quot;&quot; Cmd Not Implemented&quot;
			if Acc_Error()
				throw Exception(&quot;Cmd Not Implemented&quot;, -1, Cmd)
			return
		}
		return ret_val, ErrorLevel:=0
	}
	if Acc_Error()
		throw Exception(ErrorLevel,-1)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Maxim)]]></author>
			<pubDate>Mon, 03 Oct 2016 18:39:50 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=108190#p108190</guid>
		</item>
	</channel>
</rss>
