Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Bildschrimhelligkeit über Hotkeys?


  • Please log in to reply
9 replies to this topic
xilence123
  • Members
  • 6 posts
  • Last active: Dec 29 2014 07:46 PM
  • Joined: 26 Dec 2014

Hallo ich bin gerade auf das schöne Programm hier gestoßen und hab daher absolut kein plan, wollte nur wissen ob es möglich die Bildschirmhelligkeit irgendwie zu ändern über Hotkeys? 

Also standardmäßig ist das bei mir über die FN+pfeiltasten regelbar,

 

Dann gleich noch eine Frage, ich will über eine taste itunes starten und beenden? wie mach ich das?? muss doch mit if und else gemacht werden oder ?

 

danke für euer Verständnis^^

MfG



xilence123
  • Members
  • 6 posts
  • Last active: Dec 29 2014 07:46 PM
  • Joined: 26 Dec 2014

keiner ???



xilence123
  • Members
  • 6 posts
  • Last active: Dec 29 2014 07:46 PM
  • Joined: 26 Dec 2014

schwaches Forum!



jNizM
  • Members
  • 928 posts
  • Last active: Jan 12 2018 09:23 AM
  • Joined: 01 Aug 2012
Chill mal ein bisschen...
Schon mal aufs Datum geschaut.. Viele sind nicht da oder Feiern mit Ihrer Familie

WheelUp:: AdjustBrightness(+1)
XButton2:: DisplaySetBrightness(128)
WheelDown:: AdjustBrightness(-1)

AdjustBrightness(V = 0)
{
    V := (GetKeyState("XButton1") && V > 0) ? V + 9 : (GetKeyState("XButton1") && V < 0) ? V - 9 : V
    SB := (SB := DisplayGetBrightness() + V) > 255 ? 255 : SB < 0 ? 0 : SB
    DisplaySetBrightness(SB)
}

DisplaySetBrightness(SB := 128)
{
    loop % VarSetCapacity(GB, 1536) / 6
        NumPut((N := (SB + 128) * (A_Index - 1)) > 65535 ? 65535 : N, GB, 2 * (A_Index - 1), "UShort")
    DllCall("RtlMoveMemory", "UInt", &GB +  512, "UInt", &GB, "UInt", 512)
    DllCall("RtlMoveMemory", "UInt", &GB + 1024, "UInt", &GB, "UInt", 512)
    return DllCall("gdi32.dll\SetDeviceGammaRamp", "UInt", hDC := DllCall("user32.dll\GetDC", "UInt", 0), "UInt", &GB), DllCall("user32.dll\ReleaseDC", "UInt", 0, "UInt", hDC)
}

DisplayGetBrightness(byref GB := "")
{
    VarSetCapacity(GB, 1536, 0)
    DllCall("gdi32.dll\GetDeviceGammaRamp", "UInt", hDC := DllCall("user32.dll\GetDC", "UInt", 0), "UInt", &GB)
    return NumGet(GB, 2, "UShort") - 128, DllCall("user32.dll\ReleaseDC", "UInt", 0, "UInt", hDC)
}

[AHK] 1.1.27.04 x64 Unicode | [WIN] 10 Pro (Version 1709)
My GitHub Profile | Donations are appreciated if I could help you

nnnik
  • Members
  • 1625 posts
  • Last active: Jan 24 2019 02:19 PM
  • Joined: 28 Jul 2012
Zudem ist dieses Forum hier ziemlich inaktiv anders als das neue Forum.
EDIT Naja zumindest was die Helfer betrifft.

Visit the new forum ahkscript.org.

http://ahkscript.org


xilence123
  • Members
  • 6 posts
  • Last active: Dec 29 2014 07:46 PM
  • Joined: 26 Dec 2014

danke für die antwort!

tut mir leid das ich so rum stresse bins nur nicht gewohnt das hier so selten jemand schreibt^^

wie funktioniert der spaß jetzt?

 

wenn ich das so wie es ist kopiere dann kommt Error at line 14.

Missing comma, hab leider null Plan deswegen frag ich.... 



jNizM
  • Members
  • 928 posts
  • Last active: Jan 12 2018 09:23 AM
  • Joined: 01 Aug 2012
Erstmal dafür sorgen das du die "richtige" und "aktulle" Version von AutoHotkey hast

AutoHotkey Downloads
[AHK] 1.1.27.04 x64 Unicode | [WIN] 10 Pro (Version 1709)
My GitHub Profile | Donations are appreciated if I could help you

xilence123
  • Members
  • 6 posts
  • Last active: Dec 29 2014 07:46 PM
  • Joined: 26 Dec 2014

ok jetzt läufts, allerdings ist das nicht die Bildschirmhelligkeit, eher so eine Art Kontrast?

Ich meinte die Bildschirmhelligkeit der LEDs von meinem LED bildschirm, eine idee?



jNizM
  • Members
  • 928 posts
  • Last active: Jan 12 2018 09:23 AM
  • Joined: 01 Aug 2012
Es verändert nicht den Kontrast sondern den Gamma wert (SetDeviceGammaRamp)
[AHK] 1.1.27.04 x64 Unicode | [WIN] 10 Pro (Version 1709)
My GitHub Profile | Donations are appreciated if I could help you

xilence123
  • Members
  • 6 posts
  • Last active: Dec 29 2014 07:46 PM
  • Joined: 26 Dec 2014

ja ok dann den gamma wert, gibt es was wo es die Helligkeit ändert die ich will? also die man auch über die FN tasten regeln kann?