<?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=3452&amp;type=atom" />
	<updated>2010-10-24T19:42:52Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=3452</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: изменения яркости системы (работа с контролами)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=40802#p40802" />
			<content type="html"><![CDATA[<p>Прочитал. К сожалению С++ (если не ошибаюсь) для меня темный лес. Даже эти примеры мне не помогли. Если кто-то может помочь, прошу помощи <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[InFlames]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24849</uri>
			</author>
			<updated>2010-10-24T19:42:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=40802#p40802</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: изменения яркости системы (работа с контролами)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=40800#p40800" />
			<content type="html"><![CDATA[<p>Там ещё есть PDF «NVIDIA Driver Settings. Programming Guide» (PG-5116-001_v01_public.pdf). Для начала попробуйте посмотреть и его.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-10-24T19:25:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=40800#p40800</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: изменения яркости системы (работа с контролами)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=40799#p40799" />
			<content type="html"><![CDATA[<p>1. Скачал архив NVAPI_May2010 со страницы, на которую я дал ссылку. Куда это всё &quot;пихать&quot;?<br />2. </p><div class="codebox"><pre><code>NVAPI_INTERFACE  NvAPI_VIO_SetGamma (NvVioHandle hVioHandle, NVVIOGAMMACORRECTION *pGamma)</code></pre></div><p>Как вызвать эту функцию? Слово NVAPI_INTERFACE тоже часть функции или просто пояснение?</p>]]></content>
			<author>
				<name><![CDATA[InFlames]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24849</uri>
			</author>
			<updated>2010-10-24T17:54:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=40799#p40799</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: изменения яркости системы (работа с контролами)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=40796#p40796" />
			<content type="html"><![CDATA[<p><strong>NvAPI_VIO_SetGamma</strong>?<br /></p><div class="codebox"><pre><code>hh.exe NVAPI_Reference_Developer_R256.chm::/group__vidio.html#gac2ef0e2baec1cc564f6735de3a1ba5a4</code></pre></div>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-10-24T17:11:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=40796#p40796</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: изменения яркости системы (работа с контролами)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=40789#p40789" />
			<content type="html"><![CDATA[<p>В поисках решения проблемы на Windows 7 нашел такую страничку <a href="http://developer.nvidia.com/object/nvapi.html">http://developer.nvidia.com/object/nvapi.html</a>. На форуме разработчиков пишут, что работает на Win7. Я к сожалению не смог разобраться в этом. Может кто взглянет на это и пояснит, если сможет. Меня интересует как изменить яркость системы через драйвер нвидиа.</p>]]></content>
			<author>
				<name><![CDATA[InFlames]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24849</uri>
			</author>
			<updated>2010-10-24T15:33:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=40789#p40789</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: изменения яркости системы (работа с контролами)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=38507#p38507" />
			<content type="html"><![CDATA[<p>Ясно.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-08-13T21:03:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=38507#p38507</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: изменения яркости системы (работа с контролами)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=38505#p38505" />
			<content type="html"><![CDATA[<p>UAC&nbsp; отключен.<br />В свойства-совместимость уровень прав выбрать не могу, видимо из-за отключенного UAC.</p>]]></content>
			<author>
				<name><![CDATA[InFlames]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24849</uri>
			</author>
			<updated>2010-08-13T19:58:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=38505#p38505</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: изменения яркости системы (работа с контролами)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=38502#p38502" />
			<content type="html"><![CDATA[<p>А если запускать «rundll32.exe» с повышенными привилегиями?</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-08-13T18:30:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=38502#p38502</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: изменения яркости системы (работа с контролами)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=38501#p38501" />
			<content type="html"><![CDATA[<p>Версия панели Nvidia 2.8.254.08<br />Вот <a href="http://forum.script-coding.com/viewtopic.php?pid=26479#p26479">такой</a> вариант уже не прокатывает. Система просто никак не реагирует на вызов этих функций.<br />Стоит Windows 7.<br />Может подскажете в чем дело?</p>]]></content>
			<author>
				<name><![CDATA[InFlames]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24849</uri>
			</author>
			<updated>2010-08-13T15:54:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=38501#p38501</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: изменения яркости системы (работа с контролами)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=26658#p26658" />
			<content type="html"><![CDATA[<p>Если у Вас работает и без них — вполне можно обойтись.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2009-08-01T08:24:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=26658#p26658</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: изменения яркости системы (работа с контролами)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=26655#p26655" />
			<content type="html"><![CDATA[<p>У меня в скрипте помимо хоткеев есть еще и функции для ПДУ. Попробовал запустить с Вашим вариантом, всё отлично работает и другим таймерам и функциям не мешает.<br />Только не пойму, зачем строки с IfWinActive и IfWinNotActive ? Если мы уже дождались активации окна, то зачем нам проверять активно ли оно?</p>]]></content>
			<author>
				<name><![CDATA[InFlames]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24849</uri>
			</author>
			<updated>2009-07-31T23:53:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=26655#p26655</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: изменения яркости системы (работа с контролами)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=26653#p26653" />
			<content type="html"><![CDATA[<p>Наверное, не при появлении, а при активизации (вместо «SoundBeep» — требуемая команда изменения яркости, вместо «ahk_class Notepad» — характеристики требуемого окна):<br /></p><div class="codebox"><pre><code>Loop
{
    WinWaitActive, ahk_class Notepad
    IfWinActive, ahk_class Notepad
        SoundBeep, 880, 500
    WinWaitNotActive, ahk_class Notepad
    IfWinNotActive, ahk_class Notepad
        SoundBeep, 440, 500
}</code></pre></div><div class="quotebox"><cite>InFlames пишет:</cite><blockquote><p>Не остановится ли он на команде WinWait?</p></blockquote></div><p>Остановится, но назначенные горячие клавиши должны продолжать работать.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2009-07-31T22:10:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=26653#p26653</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: изменения яркости системы (работа с контролами)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=26652#p26652" />
			<content type="html"><![CDATA[<p>Как сделать так, что бы можно было изменять яркость при появлении какого-либо окна?<br />Такой вариант не очень подходит, т.к. при его выполнении рядом со стрелкой появляются часы, система немного загружается, что не очень удобно.<br /></p><div class="codebox"><pre><code>settimer, gamma, 500

gamma:
IfWinNotExist WinTitle
run rundll32.exe NvCpl.dll`,dtcfg setgamma 1 all 1
else
run rundll32.exe NvCpl.dll`,dtcfg setgamma 1 all 125
return</code></pre></div><p>Есть, ли такая функция, что бы можно было ожидать появления окна, и при этом работоспособной оставалась остальная часть скрипта?<br />Например, скрипт содержащий хоткеи, и другие функции<br /></p><div class="codebox"><pre><code>!r::
MyFunction
return

MyFunction:
Do Some Actions
return

WinWait MyWindow
Do Another Actions</code></pre></div><p>Не остановится ли он на команде WinWait?</p>]]></content>
			<author>
				<name><![CDATA[InFlames]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24849</uri>
			</author>
			<updated>2009-07-31T21:36:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=26652#p26652</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: изменения яркости системы (работа с контролами)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=26507#p26507" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Moжно покороче немного:<br /></p><div class="codebox"><pre><code>SetKeyDelay, -1
RequiredPos = 70   ; здесь указать позицию в пределах диапазона

; определяем текущую позицию
TBM_GETPOS = 1024
Sendmessage, TBM_GETPOS,,, msctls_trackbar324, WinTitle  ; сменить WinTitle на реальное название окна
pos := ErrorLevel

Shift := RequiredPos - pos
SendKey := Shift &gt; 0 ? &quot;{Right &quot; Shift &quot;}&quot; : &quot;{Left &quot; (-Shift) &quot;}&quot;
ControlSend, msctls_trackbar324, % SendKey, WinTitle  ; сменить WinTitle на реальное название окна
Return</code></pre></div></blockquote></div><p>этот вариант рабочий</p><p>но все же этот самый оптимальный<br /></p><div class="codebox"><pre><code>rundll32.exe NvCpl.dll,dtcfg setgamma 1 all 125</code></pre></div><p>Как сделать выполнение этой строки в ahk? В командной строке всё прекрасно работает. Может стоит записать эту строку в bat файл и сделать хоткей в ahk?</p><br /><p>Добавлено:<br />все разобрался, просто надо экранировать запятую, тогда можно в ahk использовать run</p><p>Собственно итог<br /></p><div class="codebox"><pre><code>#4::
q:=!q
if q 
run rundll32.exe NvCpl.dll`,dtcfg setgamma 1 all 125
else
run rundll32.exe NvCpl.dll`,dtcfg setgamma 1 all 1
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[InFlames]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24849</uri>
			</author>
			<updated>2009-07-27T20:25:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=26507#p26507</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: изменения яркости системы (работа с контролами)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=26500#p26500" />
			<content type="html"><![CDATA[<p>Moжно покороче немного:<br /></p><div class="codebox"><pre><code>SetKeyDelay, -1
RequiredPos = 70   ; здесь указать позицию в пределах диапазона

; определяем текущую позицию
TBM_GETPOS = 1024
Sendmessage, TBM_GETPOS,,, msctls_trackbar324, WinTitle  ; сменить WinTitle на реальное название окна
pos := ErrorLevel

Shift := RequiredPos - pos
SendKey := Shift &gt; 0 ? &quot;{Right &quot; Shift &quot;}&quot; : &quot;{Left &quot; (-Shift) &quot;}&quot;
ControlSend, msctls_trackbar324, % SendKey, WinTitle  ; сменить WinTitle на реальное название окна
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2009-07-27T18:21:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=26500#p26500</id>
		</entry>
</feed>
