Also ich hab jetzt so spontan die Idee
(ähh siehe Shoutbox x'D)
ein Script zu coden, das Generaleinstellungen des Computers übernimmt
man soll also via slider helligkeit und lautstärke regeln können
ich habs mir etwa so gedacht :
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 623, 194, 215, 285)
$Lautstaerke = GUICtrlCreateSlider(184, 72, 265, 33)
$Label1 = GUICtrlCreateLabel("Lautstärke:", 40, 80, 57, 17)
$Label2 = GUICtrlCreateLabel("Zeit:", 432, 24, 25, 17)
$zeit = GUICtrlCreateLabel("Label3", 472, 24, 148, 17)
$Label4 = GUICtrlCreateLabel("Bildschirmhelligkeit", 40, 120, 92, 17)
$Helligkeit = GUICtrlCreateSlider(184, 112, 257, 33)
$an = GUICtrlCreateButton("An=ESC", 456, 128, 49, 17, $WS_GROUP)
$aus = GUICtrlCreateButton("Aus", 528, 128, 49, 17, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Opt("TrayMenuMode", 1)
Opt("TrayOnEventMode", 1)
Opt('GUIOnEventMode', 1)
Global Const $lciWM_SYSCommand = 274
Global Const $lciSC_MonitorPower = 61808
Global Const $lciPower_Off = 2
Global Const $lciPower_On = -1
Global $title= "Monitor-AutoStandby"
Global $IniFile = @ScriptDir & '\Monitor-AutoStandby.ini'
Global $aTime[14]
Global $MonitorIsOff = False
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While 1
HotKeySet("{ESC}", "an")
guictrlsetdata($zeit, @HOUR&":"&@MIN&":"&@SEC)
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $an
an ()
Case $aus
aus ()
EndSwitch
sleep(100)
WEnd
func an ()
$MonitorIsOff = False
Local $Progman_hwnd = WinGetHandle('[CLASS:Progman]')
DllCall('user32.dll', 'int', 'SendMessage', _
'hwnd', $Progman_hwnd, _
'int', $lciWM_SYSCommand, _
'int', $lciSC_MonitorPower, _
'int', $lciPower_On)
EndFunc
func aus ()
$MonitorIsOff = True
Local $Progman_hwnd = WinGetHandle('[CLASS:Progman]')
While $MonitorIsOff = True
DllCall('user32.dll', 'int', 'SendMessage', _
'hwnd', $Progman_hwnd, _
'int', $lciWM_SYSCommand, _
'int', $lciSC_MonitorPower, _
'int', $lciPower_Off)
_IdleWaitCommit(0)
Sleep(20)
WEnd
EndFunc