<?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=5962&amp;type=atom" />
	<updated>2011-07-02T06:48:39Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=5962</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запустить скрипт по щелчку иконки трея]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=49592#p49592" />
			<content type="html"><![CDATA[<p>Огромное всем спасибо, варианты подходящие!</p>]]></content>
			<author>
				<name><![CDATA[Zanoza]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26155</uri>
			</author>
			<updated>2011-07-02T06:48:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=49592#p49592</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запустить скрипт по щелчку иконки трея]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=49575#p49575" />
			<content type="html"><![CDATA[<p>В ожидании однократного и двойного клика:</p><div class="codebox"><pre><code>#Persistent
#SingleInstance Force

Menu, Tray, Click, 1
Menu, Tray, NoStandard
Menu, Tray, Add, &amp;Volume1, Volume
Menu, Tray, Add, &amp;Volume, DoubleClick
Menu, Tray, Delete, &amp;Volume1, ;!!!!!!
Menu, Tray, Default, &amp;Volume
Menu, Tray, Add, Выход, Exit
return


DoubleClick:
  If RClicked &lt;&gt; Yes
    {
      If Clicks =
        {
          SetTimer, Volume, 500
          Clicks = 1
          Return
        }
    }
  SetTimer, Volume, Off

  Run, %A_WinDir%\system32\taskmgr.exe

  Clicks =
  RClicked =
Return

Volume:
  SetTimer, Volume, Off

  Process, Exist, sndvol32.exe
  if !ErrorLevel {
    Run, %A_WinDir%\system32\sndvol32.exe
    Menu, Tray, Icon, %A_WinDir%\system32\sndvol32.exe
  }
  else {
    Process, Close, % ErrorLevel
    Menu, Tray, Icon, %A_WinDir%\system32\taskmgr.exe
  }

  Clicks =
  RClicked =
Return

Exit:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[DD]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25263</uri>
			</author>
			<updated>2011-07-01T15:11:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=49575#p49575</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запустить скрипт по щелчку иконки трея]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=49574#p49574" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Zanoza пишет:</cite><blockquote><p>Можно-ли создать скрип ... ожидании клика мыши по иконке в трее ...</p></blockquote></div><div class="codebox"><pre><code>Menu, Tray, NoStandard
Menu, Tray, Icon, %A_WinDir%\system32\sndvol32.exe ; у меня XP :P
Menu, Tray, Add, &amp;Volume, Volume
Menu, Tray, Add, &amp;Exit, Exit
Menu, Tray, Default, &amp;Volume
Menu, Tray, Tip, Volume

; Any script that calls OnMessage anywhere is automatically persistent...
OnMessage(0x404,&quot;WindowProc&quot;)
Return

;~ ToolTip, % &quot;hwnd &quot; hwnd &quot; Msg &quot; Msg &quot; lParam &quot; lParam &quot; wParam &quot; wParam
WindowProc(wParam,lParam,Msg,hwnd)
{
	if (Msg=0x404&amp;&amp;lParam=0x201) ; WM_USER+4 &amp;&amp; WM_LBUTTONDOWN
	SetTimer, Volume,-1 
}

Volume:
Process, Exist, sndvol32.exe
if !ErrorLevel
Run, %A_WinDir%\system32\sndvol32.exe
else Process, Close, % ErrorLevel
Return
 
Exit:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[kirtech]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26525</uri>
			</author>
			<updated>2011-07-01T14:30:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=49574#p49574</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запустить скрипт по щелчку иконки трея]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=49560#p49560" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Zanoza пишет:</cite><blockquote><p>...в ожидании клика мыши по иконке в трее...</p></blockquote></div><p>С двух <em>кликов</em>, как минимум <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />:</p><div class="codebox"><pre><code>#Persistent
Menu, Tray, NoStandard
Menu, Tray, Icon, SndVol.exe
Menu, Tray, Add, &amp;Volume, Volume
Menu, Tray, Add, &amp;Exit, Exit
Menu, Tray, Default, &amp;Volume
Menu, Tray, Tip, Volume
Return

Volume:
   Run, C:\Windows\System32\SndVol.exe -f 66061452 4116
;   Run, C:\Windows\System32\SndVol.exe -r 65864847 0
   Return

Exit:
   SplashTextOn, 80, 25,, Exit script
   Sleep, 500
   SplashTextOff
   ExitApp</code></pre></div><p>При желании, можно в этот скрипт <a href="http://forum.script-coding.com/viewtopic.php?pid=49308#p49308">добавить</a> <em>горячие</em> клавиши.</p>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-07-01T01:30:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=49560#p49560</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запустить скрипт по щелчку иконки трея]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=49558#p49558" />
			<content type="html"><![CDATA[<p>Изначально&nbsp; значок был, после 2 - 3х перезагрузок и исчез (почему-то).<br />С помощью команды&nbsp; </p><div class="codebox"><pre><code>Run, SndVol.exe -f, ,, SndVolPID</code></pre></div><p>я открыл регулятор громкости.<br />Впрос: <br />Можно-ли создать скрипт, который отображается только в трее&nbsp; (в ожидании клика мыши по иконке в трее этого-же скрипта) запустил вот это ( Run, SndVol.exe -f, ,, SndVolPID ). ?</p>]]></content>
			<author>
				<name><![CDATA[Zanoza]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26155</uri>
			</author>
			<updated>2011-06-30T22:50:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=49558#p49558</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запустить скрипт по щелчку иконки трея]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=49540#p49540" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Zanoza пишет:</cite><blockquote><p>Просто у меня не отображаетя динамик в трее почемуто...</p></blockquote></div><p>Надо проверить настройки отображения <a href="http://ergosolo.ru/reviews/hotkeys/Windows7_2/">системного значка громкости</a>.</p>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-06-29T21:19:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=49540#p49540</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Запустить скрипт по щелчку иконки трея]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=49539#p49539" />
			<content type="html"><![CDATA[<p>Ничего не понял. Если запустить нужно скрипт, тогда зачем <em>Run ,&nbsp; SndVol.exe -f, ,, SndVolPID</em>? <em>SndVol.exe</em> — это вроде не скрипт. И по какой иконке кликать, если скрипт не запущен?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-06-29T20:16:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=49539#p49539</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Запустить скрипт по щелчку иконки трея]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=49537#p49537" />
			<content type="html"><![CDATA[<p>AHK: Запустить скрипт кликом мыши по иконке трея, возможно-ли? </p><div class="codebox"><pre><code>Run, SndVol.exe -f, ,, SndVolPID</code></pre></div><p>Скрипт запустить-(кликом мыши в трее&nbsp; на созданный скрипт - Run ,&nbsp; SndVol.exe -f, ,, SndVolPID.)<br />Просто у меня не отображаетя динамик в трее почемуто ?! , а винду не охота переустонавливать . Можно-ли так&nbsp; сделать в AHK ?<br />На всякий случай - (система WIN7 /32.)<br />Любой ответ приветствуется <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />Зарание спасибо за помощь!</p>]]></content>
			<author>
				<name><![CDATA[Zanoza]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26155</uri>
			</author>
			<updated>2011-06-29T19:34:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=49537#p49537</id>
		</entry>
</feed>
