<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Регулировка яркости экрана]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=10981</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10981&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Регулировка яркости экрана».]]></description>
		<lastBuildDate>Sun, 27 Sep 2015 16:47:34 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Регулировка яркости экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=97719#p97719</link>
			<description><![CDATA[<p>Слышал, можно как-то перехватить при помощи ahk скан коды с родной клавы на hid уровне. А можно ли наоборот, отправить команды со второй клавиатуры, эмулируя HID устройство?</p>]]></description>
			<author><![CDATA[null@example.com (DJ_URAN)]]></author>
			<pubDate>Sun, 27 Sep 2015 16:47:34 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=97719#p97719</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Регулировка яркости экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=97717#p97717</link>
			<description><![CDATA[<p>Потому что это делают дрова и программа входящая в комплект.</p>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Sun, 27 Sep 2015 13:09:26 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=97717#p97717</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Регулировка яркости экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=97716#p97716</link>
			<description><![CDATA[<p>Почему статусбар родной виндовый появляется только при регулировке кнопками ноута?</p>]]></description>
			<author><![CDATA[null@example.com (DJ_URAN)]]></author>
			<pubDate>Sat, 26 Sep 2015 20:47:20 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=97716#p97716</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Регулировка яркости экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=97715#p97715</link>
			<description><![CDATA[<p>Последний скрипт выдает ошибку. Предыдущий опробовал с F1 и F2, яркость меняется. Бар выскакивает самопальный=)<br />Я когда говорил про статусбар, я имел в виду штатный бар от windows. При регулировке громкости он же появляется, и когда яркость регулирую родной ноутбучной клавой, тоже появляется статусбар с ползунком.<br />Их откуда выдрать?</p>]]></description>
			<author><![CDATA[null@example.com (DJ_URAN)]]></author>
			<pubDate>Sat, 26 Sep 2015 18:47:35 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=97715#p97715</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Регулировка яркости экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=97714#p97714</link>
			<description><![CDATA[<div class="quotebox"><cite>DJ_URAN пишет:</cite><blockquote><p>А так вообще ничего не происходит.<br />Я подумал, может, как-то можно использовать этот документ: https://msdn.microsoft.com/en-us/library/windows/hardware/dn613956%28v=vs.85%29.aspx</p></blockquote></div><p>Используй &quot;F1&quot;, &quot;F2&quot;.</p>]]></description>
			<author><![CDATA[null@example.com (Eduard)]]></author>
			<pubDate>Sat, 26 Sep 2015 18:31:11 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=97714#p97714</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Регулировка яркости экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=97712#p97712</link>
			<description><![CDATA[<p><strong><span style="color: #ff0000">Бар™.</span></strong><br /></p><div class="codebox"><pre><code>#NoEnv
Br:= 3 ; 0-10

f1::
if Br &gt; 0
    Br--
ToolTip, % levelbar(Br)
SetBrightness(Br*10)
SetTimer, HideTool, -700
return

f2::
if br &lt;10
    Br++
ToolTip, % levelbar(Br)
SetBrightness(Br*10)
SetTimer, HideTool, -700
return

levelbar(ByRef v){
    Loop, % v
        a.=&quot;☻&quot;
    Loop, % 10 - v
        a.=&quot;☺&quot;
    return &quot;[&quot; a &quot;]&quot;
}

HideTool:
ToolTip
return

;~ c:= 0
;~ Loop, 11
;~ {
    ;~ SetBrightness((c++) * 10)
    ;~ Sleep 1000
;~ }
;~ ExitApp

SetBrightness(ByRef Level)
{
hLCD := DllCall(&quot;CreateFile&quot;
    , Str, &quot;\\.\LCD&quot;
    , UInt, 0x80000000 | 0x40000000  ; GENERIC_READ | GENERIC_WRITE
    , UInt, 0x1 | 0x2  ; FILE_SHARE_READ | FILE_SHARE_WRITE
    , UInt, 0
    , UInt, 0x3  ; OPEN_EXISTING
    , UInt, 0, UInt, 0)
if hLCD &lt;&gt; -1
{
    FILE_DEVICE_VIDEO := 0x00000023, METHOD_BUFFERED := 0, FILE_ANY_ACCESS := 0
    VarSetCapacity(DISPLAY_BRIGHTNESS, 3, 0)
        NumPut(0x03, DISPLAY_BRIGHTNESS, 0, &quot;UChar&quot;)    ; 0x01 = Set AC, 0x02 = Set DC, 0x03 = Set both
        NumPut(Level, DISPLAY_BRIGHTNESS, 1, &quot;UChar&quot;)        ; The AC brightness level
        NumPut(Level, DISPLAY_BRIGHTNESS, 2, &quot;UChar&quot;)        ; The DC brightness level
     DllCall(&quot;DeviceIoControl&quot;
        , UInt, hLCD
        , UInt, (FILE_DEVICE_VIDEO&lt;&lt;16 | 0x127&lt;&lt;2 | METHOD_BUFFERED&lt;&lt;14 | FILE_ANY_ACCESS) ; IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS
        , UInt, &amp;DISPLAY_BRIGHTNESS, UInt, 3
        , UInt, 0, UInt, 0
        , UIntP, dwBytesReturned  ; Unused.
        , UInt, 0)
    DllCall(&quot;CloseHandle&quot;, UInt, hLCD)
}
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Eduard)]]></author>
			<pubDate>Sat, 26 Sep 2015 18:16:19 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=97712#p97712</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Регулировка яркости экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=97711#p97711</link>
			<description><![CDATA[<p>А так вообще ничего не происходит.<br />Я подумал, может, как-то можно использовать этот документ: https://msdn.microsoft.com/en-us/library/windows/hardware/dn613956%28v=vs.85%29.aspx</p>]]></description>
			<author><![CDATA[null@example.com (DJ_URAN)]]></author>
			<pubDate>Sat, 26 Sep 2015 18:14:04 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=97711#p97711</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Регулировка яркости экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=97710#p97710</link>
			<description><![CDATA[<p>Так?<br /></p><div class="codebox"><pre><code>#NoEnv
Br:= 3 ; 0-10

f1::
if Br &gt; 0
    Br--
ToolTip, % val:= Br*10 &quot;%&quot;
SetBrightness(val)
SetTimer, HideTool, -700
return

f2::
if br &lt;10
    Br++
ToolTip, % val:= Br*10 &quot;%&quot;
SetBrightness(val)
SetTimer, HideTool, -700
return

HideTool:
ToolTip
return

;~ c:= 0
;~ Loop, 11
;~ {
    ;~ SetBrightness((c++) * 10)
    ;~ Sleep 1000
;~ }
;~ ExitApp

SetBrightness(ByRef Level)
{
hLCD := DllCall(&quot;CreateFile&quot;
    , Str, &quot;\\.\LCD&quot;
    , UInt, 0x80000000 | 0x40000000  ; GENERIC_READ | GENERIC_WRITE
    , UInt, 0x1 | 0x2  ; FILE_SHARE_READ | FILE_SHARE_WRITE
    , UInt, 0
    , UInt, 0x3  ; OPEN_EXISTING
    , UInt, 0, UInt, 0)
if hLCD &lt;&gt; -1
{
    FILE_DEVICE_VIDEO := 0x00000023, METHOD_BUFFERED := 0, FILE_ANY_ACCESS := 0
    VarSetCapacity(DISPLAY_BRIGHTNESS, 3, 0)
        NumPut(0x03, DISPLAY_BRIGHTNESS, 0, &quot;UChar&quot;)    ; 0x01 = Set AC, 0x02 = Set DC, 0x03 = Set both
        NumPut(Level, DISPLAY_BRIGHTNESS, 1, &quot;UChar&quot;)        ; The AC brightness level
        NumPut(Level, DISPLAY_BRIGHTNESS, 2, &quot;UChar&quot;)        ; The DC brightness level
     DllCall(&quot;DeviceIoControl&quot;
        , UInt, hLCD
        , UInt, (FILE_DEVICE_VIDEO&lt;&lt;16 | 0x127&lt;&lt;2 | METHOD_BUFFERED&lt;&lt;14 | FILE_ANY_ACCESS) ; IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS
        , UInt, &amp;DISPLAY_BRIGHTNESS, UInt, 3
        , UInt, 0, UInt, 0
        , UIntP, dwBytesReturned  ; Unused.
        , UInt, 0)
    DllCall(&quot;CloseHandle&quot;, UInt, hLCD)
}
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Eduard)]]></author>
			<pubDate>Sat, 26 Sep 2015 17:51:02 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=97710#p97710</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Регулировка яркости экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=97708#p97708</link>
			<description><![CDATA[<p>Скрипт опробовал. Происходит ступенчатая регулировка яркости от минимума к максимуму. Индикатора нет. Ползункового.</p>]]></description>
			<author><![CDATA[null@example.com (DJ_URAN)]]></author>
			<pubDate>Sat, 26 Sep 2015 14:58:30 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=97708#p97708</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Регулировка яркости экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=97707#p97707</link>
			<description><![CDATA[<p>Протестируй<br /></p><div class="codebox"><pre><code>
#NoEnv

c:= 0
Loop, 11
{
    SetBrightness((c++) * 10)
    Sleep 1000
}
ExitApp

SetBrightness(ByRef Level)
{
hLCD := DllCall(&quot;CreateFile&quot;
    , Str, &quot;\\.\LCD&quot;
    , UInt, 0x80000000 | 0x40000000  ; GENERIC_READ | GENERIC_WRITE
    , UInt, 0x1 | 0x2  ; FILE_SHARE_READ | FILE_SHARE_WRITE
    , UInt, 0
    , UInt, 0x3  ; OPEN_EXISTING
    , UInt, 0, UInt, 0)
if hLCD &lt;&gt; -1
{
    FILE_DEVICE_VIDEO := 0x00000023, METHOD_BUFFERED := 0, FILE_ANY_ACCESS := 0
    VarSetCapacity(DISPLAY_BRIGHTNESS, 3, 0)
        NumPut(0x03, DISPLAY_BRIGHTNESS, 0, &quot;UChar&quot;)    ; 0x01 = Set AC, 0x02 = Set DC, 0x03 = Set both
        NumPut(Level, DISPLAY_BRIGHTNESS, 1, &quot;UChar&quot;)        ; The AC brightness level
        NumPut(Level, DISPLAY_BRIGHTNESS, 2, &quot;UChar&quot;)        ; The DC brightness level
     DllCall(&quot;DeviceIoControl&quot;
        , UInt, hLCD
        , UInt, (FILE_DEVICE_VIDEO&lt;&lt;16 | 0x127&lt;&lt;2 | METHOD_BUFFERED&lt;&lt;14 | FILE_ANY_ACCESS) ; IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS
        , UInt, &amp;DISPLAY_BRIGHTNESS, UInt, 3
        , UInt, 0, UInt, 0
        , UIntP, dwBytesReturned  ; Unused.
        , UInt, 0)
    DllCall(&quot;CloseHandle&quot;, UInt, hLCD)
}
}
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Eduard)]]></author>
			<pubDate>Sat, 26 Sep 2015 14:25:29 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=97707#p97707</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Регулировка яркости экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=97705#p97705</link>
			<description><![CDATA[<p>Други, помогайте!<br />Имеется ноутбук с подключенной клавиатурой (bluetooth) на windows 10.<br />При помощи Autohotkey и nircmd создал скрипт регулировки яркости, но при регулировке не отображается GUI windows (ghb регулировке громкости, например, он есть. Ползунок отображается только при регулировке с родной ноутбучной клавиатуры. Прочитал про Nircmd, там пишут, что ползунка отображаться не должно. <br />Можно ли как-нибудь управлять яркостью через DLL драйвера видеокарты? (У меня ATI)<br />Нашел только способ для Nvidia http://forum.script-coding.com/viewtopic.php?pid=32381#p32381<br />Есть ли подобное описалово для ATI?<br />Спасибо всем за помощь!</p>]]></description>
			<author><![CDATA[null@example.com (DJ_URAN)]]></author>
			<pubDate>Sat, 26 Sep 2015 08:32:08 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=97705#p97705</guid>
		</item>
	</channel>
</rss>
