<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Код не работает в одном файле с другими]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14275&amp;type=atom" />
	<updated>2018-10-26T09:19:19Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=14275</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Код не работает в одном файле с другими]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129477#p129477" />
			<content type="html"><![CDATA[<p>Спасибо, заработало!:)</p><p>зы: Только код нужно поставить на самый верх, а между дрими скриптами он по-прежнему отказывается работать.</p>]]></content>
			<author>
				<name><![CDATA[AHK_on]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34680</uri>
			</author>
			<updated>2018-10-26T09:19:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129477#p129477</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Код не работает в одном файле с другими]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129471#p129471" />
			<content type="html"><![CDATA[<p>Добавьте в конце #IfWinActive</p>]]></content>
			<author>
				<name><![CDATA[rowe]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33506</uri>
			</author>
			<updated>2018-10-25T19:34:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129471#p129471</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Код не работает в одном файле с другими]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129465#p129465" />
			<content type="html"><![CDATA[<p>Есть рабочий код, по нажатию ctrl + alt + N он создаёт текстовый файл с датой.</p><div class="codebox"><pre><code>FileName := &quot;\&quot; A_YYYY A_MM A_DD &quot;_&quot; A_Hour A_Min A_Sec &quot;.txt&quot;  ; шаблон имени нового файла
SetTitleMatchMode, Regex
Return

#IfWinActive ahk_class (Progman|WorkerW|CabinetWClass)
^!vk4E::  ; Ctrl + Alt + N
   WinGetClass, class, A
   if (class ~= &quot;Progman|WorkerW&quot;)
      FolderPath := A_Desktop
   else  {
      for item in ComObjCreate(&quot;Shell.Application&quot;).Windows
         continue
      until WinExist(&quot;A&quot;) = item.hwnd || item := &quot;&quot;
      FolderPath := item.Document.Folder.Self.Path
   }
   SplitPath, FolderPath,,,,, Drive
   if InStr(Drive, &quot;::&quot;)  {
      MsgBox, Это служебная папка, в ней нельзя создать файл
      Return
   }
   NewFileName := FolderPath &quot;\&quot; FileName &quot;.txt&quot;
   
   While FileExist(NewFileName)  {
      RegExMatch(NewFileName, &quot;i).*\\&quot; FileName &quot; \((\d+)\)\.txt&quot;, number)
      NewFileName := FolderPath &quot;\&quot; FileName &quot; (&quot; . (number1 = &quot;&quot; ? 2 : number1 + 1) . &quot;).txt&quot;
   }

   FileAppend,, % NewFileName
   Run, % NewFileName
   Return</code></pre></div><p>Проблема в том, что когда я его вставляю в общий файл, он перекрывает все остальные скрипты, и скрипты перестают работать.</p><p>Подскажтие пожалуйста, что нужно дописать или убрать из кода, чтобы не мешал работать остальные скриптам.</p>]]></content>
			<author>
				<name><![CDATA[AHK_on]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34680</uri>
			</author>
			<updated>2018-10-25T15:34:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129465#p129465</id>
		</entry>
</feed>
