<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Объединить 2 скрипта / Процессы]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=16081</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=16081&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Объединить 2 скрипта / Процессы».]]></description>
		<lastBuildDate>Wed, 17 Feb 2021 19:56:40 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Объединить 2 скрипта / Процессы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146278#p146278</link>
			<description><![CDATA[<p><strong>__Михаил__</strong><br />Огромное спасибо! Всё работает!</p>]]></description>
			<author><![CDATA[null@example.com (Michael)]]></author>
			<pubDate>Wed, 17 Feb 2021 19:56:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146278#p146278</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Объединить 2 скрипта / Процессы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146267#p146267</link>
			<description><![CDATA[<p>Обновите эту метку:</p><div class="codebox"><pre><code>NewP:	; Отсев новых программ.
ZapList = System|explorer.exe|notepad.exe|chrome.exe

SortedProcesses := GetSortedProcessesByLoad()
MaxLoad := SortedProcesses[1]

If (MaxLoad.ProcessName ~= ZapList)
{
 ToolTip, % MaxLoad.ProcessName &quot; Запрещён!&quot;
 Return
}

GuiControl,, G1, % &quot;|&quot;        ; Очистить перед добавлением процесса.
GuiControl,, G1, % &quot;&quot; . MaxLoad.ProcessName
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (__Михаил__)]]></author>
			<pubDate>Wed, 17 Feb 2021 17:56:42 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146267#p146267</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Объединить 2 скрипта / Процессы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146240#p146240</link>
			<description><![CDATA[<p><strong>teadrinker</strong><br />Дело в том, что игры постоянно меняются, соотвественно и ЕХЕшники + ко всему, многие игры запускают сращу несколько ЕХЕшников, но это уже другой разговор.<br />В момент, когда у меня запущенна игра - почти не бывает лишних процессов, жрущих такое же/бОльшее кол-во ЦП. Соотвественно поиск по текущим параметрам нужного ЕХЕшника вполне актуален. Но, как и везде, есть свои подводные камни, и чтобы их устранить, мне надо добавить 1-3 процесса, которые будут пропускаться, при выборе максимально ёмкого.</p>]]></description>
			<author><![CDATA[null@example.com (Michael)]]></author>
			<pubDate>Tue, 16 Feb 2021 21:01:29 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146240#p146240</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Объединить 2 скрипта / Процессы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146239#p146239</link>
			<description><![CDATA[<p>А какой смысл тогда искать максимально загружающий процесс, если в любом случае нужен процесс игры? Может, проще сразу его по имени искать?</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 16 Feb 2021 20:55:42 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146239#p146239</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Объединить 2 скрипта / Процессы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146238#p146238</link>
			<description><![CDATA[<p><strong>__Михаил__</strong><br />Можно небольшой пример реализации подобного? Похожих тем на форуме не нашел <img src="//forum.script-coding.com/img/smilies/sad.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (Michael)]]></author>
			<pubDate>Tue, 16 Feb 2021 20:05:32 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146238#p146238</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Объединить 2 скрипта / Процессы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146237#p146237</link>
			<description><![CDATA[<p>Что угодно можно сделать, главное логику верно записать.<br />Просто делать проверку переменных на сходство и пропускать на запрещённые процессы.</p>]]></description>
			<author><![CDATA[null@example.com (__Михаил__)]]></author>
			<pubDate>Tue, 16 Feb 2021 19:57:20 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146237#p146237</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Объединить 2 скрипта / Процессы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146236#p146236</link>
			<description><![CDATA[<p><strong>teadrinker</strong><br />Назрел один очень важный вопрос, вроде по этой же тематике, поэтому задам его тут же.<br />У меня сейчас с поиском процесса максимально нагружающего ЦП - всё работает, c GUI всё отлично взаимодействует.<br />Но бывают случаи, что открытый браузер жрет больше чем игровой процесс, это единичные случае, но такое случается.<br />Так вот, возможно ли к скрипту поиска максимально жрущего ЦП процесса привязать, так сказать &quot;отсев&quot;, список процессов, которые рассматриваться не будут? И с помощью каких команд?</p>]]></description>
			<author><![CDATA[null@example.com (Michael)]]></author>
			<pubDate>Tue, 16 Feb 2021 18:46:55 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146236#p146236</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Объединить 2 скрипта / Процессы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146195#p146195</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (Michael)]]></author>
			<pubDate>Sun, 14 Feb 2021 12:22:51 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146195#p146195</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Объединить 2 скрипта / Процессы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146189#p146189</link>
			<description><![CDATA[<div class="quotebox"><cite>Michael пишет:</cite><blockquote><div class="codebox"><pre><code>Gui Add, Button, gNewApp hwndhBut x125 y19 w102 h23, 3. Отследить игру</code></pre></div></blockquote></div><p>Чувствую, веткой ошиблись. Скрипты для игр должны быть в AutoHotKey — Games. Может, в этом проблема? <img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sun, 14 Feb 2021 09:55:50 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146189#p146189</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Объединить 2 скрипта / Процессы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146188#p146188</link>
			<description><![CDATA[<p>Проверьте так:<br /></p><div class="codebox"><pre><code>ButtonПодтвердить:
MsgBox % myVar := MaxLoad.ProcessName</code></pre></div><p>Если появляется сообщение с правильным именем процесса, значит всё ок. А почему не активируется — это уж вам видней должно быть. Может, у выбранного процесса нет окна, может, их несколько, может, процесс запущен с повышенными правами.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sun, 14 Feb 2021 09:36:43 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146188#p146188</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Объединить 2 скрипта / Процессы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146187#p146187</link>
			<description><![CDATA[<p><strong>teadrinker</strong><br />Извиняюсь, что не упомянул об этом, но и это я пробовал:<br /></p><div class="codebox"><pre><code> myVar := MaxLoad.ProcessName</code></pre></div><p>В тултипе отображает нужный процесс, но при нажатии на кнопку ничего не происходит. Если писать прямой ЕХЕшник - все работает.</p>]]></description>
			<author><![CDATA[null@example.com (Michael)]]></author>
			<pubDate>Sun, 14 Feb 2021 08:57:32 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146187#p146187</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Объединить 2 скрипта / Процессы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146185#p146185</link>
			<description><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><div class="codebox"><pre><code>myVar := MaxLoad.ProcessName</code></pre></div></blockquote></div><p>А у вас что?</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sun, 14 Feb 2021 08:35:41 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146185#p146185</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Объединить 2 скрипта / Процессы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146183#p146183</link>
			<description><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><div class="codebox"><pre><code>myVar := MaxLoad.ProcessName</code></pre></div></blockquote></div><p>Пытаюсь использовать данный пример - пока не выходит.</p><p><span class="bbu">Не работает с переменной:</span><br /></p><div class="codebox"><pre><code>ButtonПодтвердить:
myVar := MaxLoad.ProcessName[1]
Gui, Submit, NoHide
;ToolTip, Пункт: %G1% ; отображение выбранного пункта
WinActivate, ahk_exe %myVar%
Return</code></pre></div><p><span class="bbu">Работает, без переменной, если прописать ЕХЕшник вручную:</span><br /></p><div class="codebox"><pre><code>ButtonПодтвердить:
;myVar := MaxLoad.ProcessName[1]
Gui, Submit, NoHide
;ToolTip, Пункт: %G1% ; отображение выбранного пункта
WinActivate, ahk_exe firefox.exe
Return</code></pre></div><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;Если нужен полный код</div><div class="fancy_spoiler"><div class="codebox"><pre><code>#SingleInstance Force
#NoEnv
SetBatchLines -1

Name = Cam OverLay

GroupAdd, AppGroup, % Name

;Gui +AlwaysOnTop
Gui -MaximizeBox
Gui Color, 0x000000
Gui Add, Button, x125 y50 w102 h23, Подтвердить
Gui Add, ListBox, vG1 gButtonПодтвердить hwndhListbox x25 y151 w196 h160
Gui Add, Button, gNewApp hwndhBut x125 y19 w102 h23, 3. Отследить игру
Gui Add, Button, gGames x15 y50 w102 h23, 2. Папка GAMES
Gui Add, Button, gOBS x15 y19 w102 h23, 1. Запустить OBS
Gui Add, Button, gReverse x125 y104 w102 h23, Реверс
Gui Add, Text, x18 y90 w210 h2 +0x10
Gui Font, c0xFFFFFF
Gui Add, GroupBox, x18 y134 w211 h188, Выбрать процесс
Gui Font
Gui Add, Edit, hwndhSear gGet vPoisk x17 y105 w100 h21, Поиск процесса...

for Process in ComObjGet(&quot;Winmgmts:&quot;).ExecQuery(&quot;Select * From Win32_Process&quot;)
 Txt .= Process.Caption &quot;|&quot;
GetSortedProcessesByLoad()
GuiControl,, % hListbox, % Txt	; Вставить из переменной.

Gui Show, w246 h340, % Name
Return

GuiEscape:
GuiClose:
ExitApp

Games:
Run, C:\Users\Администратор\Desktop\Games
Return

OBS:
Run, C:\Program Files\obs-studio\bin\64bit\obs64.exe, C:\Program Files\obs-studio\bin\64bit\
Sleep, 9000
WinSetTitle, ahk_class Qt5152QWindowIcon, , OBS
Sleep, 1000
MouseMove, 100, 760
Sleep, 200
MouseClick, left, 100, 760
MouseClick, right, 100, 760
Sleep, 200
MouseMove, 150, 650
MouseClick, left, 150, 650
Sleep, 200
If Not ОкноБезРамокДляВебки
{
		WinMove Оконный проектор (Источник) - Cam,, 0, 0, 408, 308 ; перемещаем окошко в угол + ресайз
		WinSet Style, -0x800000, Оконный проектор (Источник) - Cam ; -рамка
		WinSet Style, -0x40000, Оконный проектор (Источник) - Cam ; -рамка
		WinSet Style, -0x400000, Оконный проектор (Источник) - Cam ; -рамка
		ОкноБезРамокДляВебки := true
}
Sleep, 200
WinActivate Cam OverLay



#IfWinActive, Ahk_Group AppGroup

; Перехват клавиши Enter в своём окне:
Enter::
KeyWait, %A_ThisHotkey%, U

ControlGetFocus, F_Now, % Name	; Получить текущий выбранный контрол.
If (F_Now = &quot;ListBox1&quot;)		; Если фокус на списке сохранить пункт и выйти:
{
 Gui, Submit, NoHide
 ToolTip, Переменная = %G1%
 Sleep, 300
 ToolTip
 Return
}
Else If (F_Now = &quot;Edit1&quot;)	; Поиск в списке:
{
 GoTo, Get
}

;Else
; Send, {%A_ThisHotkey%}	; Нажать Enter если нет совпадений.
Return

#If


Get:
Gui, Submit, NoHide
T=
Loop, Parse, Txt, |
{
 If InStr(A_LoopField, Poisk)
 {
  SendMessage, 390, A_Index-1, 0,, ahk_id %hListbox%	; Выделить найденный пункт.
  T := A_Index
  Break
 }
}
If !T
{
 ToolTip, Нет такого.,0,0
 Sleep, 400
}
ToolTip
Return



ButtonПодтвердить:
myVar := MaxLoad.ProcessName[1]
Gui, Submit, NoHide
;ToolTip, Пункт: %G1% ; отображение выбранного пункта
WinActivate, ahk_exe %myVar%
Return


Reverse:
Reverse := !Reverse
GoSub, App

If Reverse
 Sort, Txt, R D|

GuiControl,, % hListbox, |	; Очистить список.
GuiControl,, % hListbox, % Txt	; Вставить из переменной.
Return


NewApp_Old:
Txt2 := Txt			; Резерв тек. списка.
GuiControl,, % hListbox, |	; Очистить список.
GuiControl,, % hListbox, Ожидание...
GuiControl, Disable, % hBut	; Блок кнопки.
GuiControl, Disable, % hSear	; Разблок поиска.
SetTimer, NewP, 1000		; Тест каждую секунду.
Return


NewP:	; Отсев новых программ.
   SortedProcesses := GetSortedProcessesByLoad()
   MaxLoad := SortedProcesses[1]
   GuiControl,, G1, % &quot;|&quot;        ; Очистить перед добавлением процесса.
   GuiControl,, G1, % &quot;&quot; . MaxLoad.ProcessName
   Return

;-------------------------------------------------------------------------------------------------------

; Обновлённый участок:
NewApp:	; Запуск / Стоп таймера - кнопка.
SW++
If !Mod(SW,2)
 GoTo, Stop

GuiControl,, G1, % &quot;|&quot;        ; Очистить перед добавлением процесса.
GuiControl,, G1, Ожидание...
GuiControl,, % hBut, 3. Остановить
GuiControl, Disable, % hSear	; Блок поиска.
SetTimer, NewP, 1000		; Тест каждую секунду.
Return

Stop:
GuiControl,, % hBut, 3. Отследить игру
GuiControl, Enable, % hSear	; Разблок поиска.
SetTimer, NewP, Off		; Выкл. обновление.
Return

;-------------------------------------------------------------------------------------------------------


GetSortedProcessesByLoad() {
   static LoadByPid := {}, prevSystemTime := &quot;&quot;
   Processes := WTSEnumProcesses()
   systemTime := GetSystemTimes()
   for k, v in Processes {
      processTime := GetProcessTimes(v.PID)
      if LoadByPid[v.PID]
         v.Load := 100*(processTime - LoadByPid[v.PID]) / (systemTime - prevSystemTime)
      LoadByPid[v.PID] := processTime
   }
   if prevSystemTime
      SortedProcesses := SortByLoad(Processes)
   prevSystemTime := systemTime
   Return SortedProcesses
}

WTSEnumProcesses() {
   DllCall(&quot;Wtsapi32\WTSEnumerateProcesses&quot;, &quot;Ptr&quot;, 0, &quot;UInt&quot;, 0, &quot;UInt&quot;, 1, &quot;PtrP&quot;, pProcessInfo, &quot;PtrP&quot;, count)
   Processes := []
   pPtr := pProcessInfo
   Loop % count {
      Processes.Push({ PID:         NumGet(pPtr + 4, &quot;UInt&quot;)
                     , ProcessName: StrGet(NumGet(pPtr + 8)) })
      pPtr += A_PtrSize = 4 ? 16 : 24
   }
   DllCall(&quot;Wtsapi32\WTSFreeMemory&quot;, &quot;Ptr&quot;, pProcessInfo)
   Return Processes
}

RunAsAdmin(exitIfNotAdmin := false) {
   commandLine := DllCall(&quot;GetCommandLine&quot;, &quot;str&quot;)
   isRestarted := !!RegExMatch(commandLine, &quot; /restart(?!\S)&quot;)
   while !( A_IsAdmin || isRestarted ) {
      try Run, % &quot;*RunAs &quot; . (A_IsCompiled ? &quot;&quot;&quot;&quot; . A_ScriptFullPath . &quot;&quot;&quot; /restart&quot;
                                           : &quot;&quot;&quot;&quot; . A_AhkPath . &quot;&quot;&quot; /restart &quot;&quot;&quot; . A_ScriptFullPath . &quot;&quot;&quot;&quot;)
      catch
         break 
      ExitApp
   }
   if !A_IsAdmin {
      MsgBox, Failed to run the script as admin!
      if exitIfNotAdmin
         ExitApp
   }
}

SetPrivilege(privilege, enable := true) {
   static PROCESS_QUERY_INFORMATION := 0x400, TOKEN_ADJUST_PRIVILEGES := 0x20, SE_PRIVILEGE_ENABLED := 0x2
   
   hProc := DllCall(&quot;OpenProcess&quot;, &quot;UInt&quot;, PROCESS_QUERY_INFORMATION, &quot;Int&quot;, false, &quot;UInt&quot;, DllCall(&quot;GetCurrentProcessId&quot;), &quot;Ptr&quot;)
   DllCall(&quot;Advapi32\OpenProcessToken&quot;, &quot;Ptr&quot;, hProc, &quot;UInt&quot;, TOKEN_ADJUST_PRIVILEGES, &quot;PtrP&quot;, token)
   
   DllCall(&quot;Advapi32\LookupPrivilegeValue&quot;, &quot;Ptr&quot;, 0, &quot;Str&quot;, privilege, &quot;Int64P&quot;, luid)
   VarSetCapacity(TOKEN_PRIVILEGES, 16, 0)
   NumPut(1, TOKEN_PRIVILEGES, &quot;UInt&quot;)
   NumPut(luid, TOKEN_PRIVILEGES, 4, &quot;Int64&quot;)
   NumPut(SE_PRIVILEGE_ENABLED, TOKEN_PRIVILEGES, 12, &quot;UInt&quot;)
   DllCall(&quot;Advapi32\AdjustTokenPrivileges&quot;, &quot;Ptr&quot;, token, &quot;Int&quot;, !enable, &quot;Ptr&quot;, &amp;TOKEN_PRIVILEGES, &quot;UInt&quot;, 0, &quot;Ptr&quot;, 0, &quot;Ptr&quot;, 0)
   res := A_LastError
   DllCall(&quot;CloseHandle&quot;, &quot;Ptr&quot;, token)
   DllCall(&quot;CloseHandle&quot;, &quot;Ptr&quot;, hProc)
   Return res  ; success — 0
}

GetProcessTimes(PID) {
   hProc := DllCall(&quot;OpenProcess&quot;, &quot;UInt&quot;, PROCESS_QUERY_INFORMATION := 0x400, &quot;int&quot;, 0, &quot;UInt&quot;, PID, &quot;Ptr&quot;)
   DllCall(&quot;GetProcessTimes&quot;, &quot;Ptr&quot;, hProc, &quot;Int64P&quot;, CreationTime, &quot;Int64P&quot;, ExitTime, &quot;Int64P&quot;, KernelTime, &quot;Int64P&quot;, UserTime)
   DllCall(&quot;CloseHandle&quot;, &quot;Ptr&quot;, hProc)
   Return KernelTime + UserTime
}

GetSystemTimes() {
   DllCall(&quot;GetSystemTimes&quot;, &quot;Int64P&quot;, IdleTime, &quot;Int64P&quot;, KernelTime, &quot;Int64P&quot;, UserTime)
   Return KernelTime + UserTime
}

SortByLoad(Processes) {
   str := &quot;&quot;
   for k, v in Processes {
      if v.PID
         str .= (str ? &quot;`n&quot; : &quot;&quot;) . v.Load . &quot;|&quot; . v.ProcessName . &quot;|&quot; . v.PID
   }
   Sort, str, N R
   SortedProcesses := []
   Loop, parse, str, `n
   {
      RegExMatch(A_LoopField, &quot;(.*)\|(.*)\|(.+)&quot;, m)
      SortedProcesses.Push({Load: m1, ProcessName: m2, PID: m3})
   }
   Return SortedProcesses
}
Return

App:	; Создать список запущенных.
Txt = 
for Process in ComObjGet(&quot;Winmgmts:&quot;).ExecQuery(&quot;Select * From Win32_Process&quot;)
 Txt .= Process.Caption &quot;|&quot;
Return

F9:: 
 	If Not ОкноБезРамокДляИгр       
	{	
		BorderSize:=0
	    WinMove, ahk_exe %G1%,, -BorderSize, -BorderSize, 1920+2*BorderSize, 1080+2*BorderSize
		WinSet, Style, -0xC00000, ahk_exe %G1% ; убрать рамку
		ОкноБезРамокДляИгр := true
	}

;	If Not ОкноБезРамокДляВебки
;	{
;		WinMove Оконный проектор (Источник) - Cam,, 0, 0, 408, 308 ; перемещаем окошко в угол + ресайз
;		WinSet Style, -0x800000, Оконный проектор (Источник) - Cam ; -рамка
;		WinSet Style, -0x40000, Оконный проектор (Источник) - Cam ; -рамка
;		WinSet Style, -0x400000, Оконный проектор (Источник) - Cam ; -рамка
;		ОкноБезРамокДляВебки := true
;	}

	IfWinExist, Оконный проектор (Источник) - Cam
	{
		WinGet ExStyle, ExStyle
		if Not (ExStyle &amp; 0x8)  ; 0x8 is WS_EX_TOPMOST. The window is always-on-top.
		{
			WinSet ExStyle, +0x20 ; чтобы клики проходили сквозь окошко
			WinSet Transparent, 255 ; прозрачность окна: 0 - максимальная, 255 - непрозрачное 
			WinSet AlwaysOnTop, On
		} else 
		 {
			WinSet ExStyle, -0x20
			WinSet Transparent, 255
			WinSet AlwaysOnTop, Off
			; переключаем режим &quot;поверх всех&quot; в окне игры, чтобы окошко ушло на задний план
			WinSet AlwaysOnTop, On, A
			WinSet AlwaysOnTop, Off, A
		 }
	}
Return

F12::
Run, R:\VIDEOS\РОЛИКИ НА ОБРАБОТКУ
Return</code></pre></div></div></div>]]></description>
			<author><![CDATA[null@example.com (Michael)]]></author>
			<pubDate>Sun, 14 Feb 2021 01:37:08 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146183#p146183</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Объединить 2 скрипта / Процессы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146158#p146158</link>
			<description><![CDATA[<div class="codebox"><pre><code>myVar := MaxLoad.ProcessName</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 13 Feb 2021 08:48:07 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146158#p146158</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Объединить 2 скрипта / Процессы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=146151#p146151</link>
			<description><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>То-есть, в вашем текущем варианте скрипт считает разницу между состоянием, когда вы нажали на кнопку последний раз и когда предыдущий. Если вы нажмёте кнопку второй раз через полчаса, буде выдан процесс, который забрал наибольшее процессорное время за эти полчаса, хотя в данный момент у него может быть нулевая загрузка.</p></blockquote></div><p>Понял, а возможно ли полученный процесс вывести в переменную или куда-нибудь ещё, чтобы работать с именем найденного процесса в других функциях? Если да, то как?</p>]]></description>
			<author><![CDATA[null@example.com (Michael)]]></author>
			<pubDate>Sat, 13 Feb 2021 00:35:25 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=146151#p146151</guid>
		</item>
	</channel>
</rss>
