- Offizieller Beitrag
Hier mal ein programm mit dem man mit einem anderen Programm windows programmieren kann :p Also das Programm heißt nircmd.exe (bzw. nircmdc.exe) und ich habe es verwendet.. Aber du brauchst halt die datei nircmdc.exe(unten downloadbar)
man kann
-systemvolume änder
-aktuellen screensaver einschalten
-und noch vieles mehr
die die grau(also disabel) hinterlegt sind sind nicht verwändbar, erstmals.. hoffe damit kann jmd was anfang... viel spaß
Code
#include <GUIConstants.au3>
$Form1 = GUICreate("AForm1", 128, 303, 192, 125)
$start = GUICtrlCreateButton("Start!", 8, 272, 75, 25)
$Radio1 = GUICtrlCreateRadio("setsysvolume", 8, 8, 113, 17)
$Radio2 = GUICtrlCreateRadio("mutesysvolume ", 8, 24, 113, 17)
$Radio3 = GUICtrlCreateRadio("unmutesysvolume ", 8, 40, 113, 17)
$Radio4 = GUICtrlCreateRadio("monitor off ", 8, 56, 113, 17)
GUICtrlSetState(-1,$GUI_DISABLE)
$Radio5 = GUICtrlCreateRadio("monitor on", 8, 72, 113, 17)
GUICtrlSetState(-1,$GUI_DISABLE)
$Radio6 = GUICtrlCreateRadio("screensaver ", 8, 88, 113, 17)
$Radio8 = GUICtrlCreateRadio("Remove titelbar ", 8, 112, 113, 17)
GUICtrlSetState(-1,$GUI_DISABLE)
$Radio9 = GUICtrlCreateRadio("Return title bar ", 8, 128, 113, 17)
GUICtrlSetState(-1,$GUI_DISABLE)
$Radio10 = GUICtrlCreateRadio("hide startbutton", 8, 144, 113, 17)
$Radio11 = GUICtrlCreateRadio("show startbutton", 8, 160, 113, 17)
$Radio12 = GUICtrlCreateRadio("hide clock", 8, 176, 113, 17)
$Radio13 = GUICtrlCreateRadio("show clock", 8, 192, 113, 17)
$Radio14 = GUICtrlCreateRadio("setdisplay", 8, 208, 113, 17)
$Radio15 = GUICtrlCreateRadio("Disable screensaver ", 8, 224, 113, 17)
$Radio17 = GUICtrlCreateRadio("Enable screensaver ", 8, 248, 113, 17)
GUISetState(@SW_SHOW)
While 1
$msg = GuiGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $start
$set = 0
If GUICtrlRead($Radio1) = $Gui_Checked Then $set = 1
If GUICtrlRead($Radio2) = $Gui_Checked Then $run = "mutesysvolume 1"
If GUICtrlRead($Radio3) = $Gui_Checked Then $run = "mutesysvolume 0"
;~ If GUICtrlRead($Radio4) = $Gui_Checked Then $run = "monitor off"
;~ If GUICtrlRead($Radio5) = $Gui_Checked Then $run = "monitor on"
If GUICtrlRead($Radio6) = $Gui_Checked Then $run = "screensaver "
If GUICtrlRead($Radio8) = $Gui_Checked Then $run = 'win -style title "my computer" 0x00C00000 '
If GUICtrlRead($Radio9) = $Gui_Checked Then $run = "win +style title ""my computer"" 0x00C00000 "
If GUICtrlRead($Radio10) = $Gui_Checked Then $run = "win child class ""Shell_TrayWnd"" hide class ""button"" "
If GUICtrlRead($Radio11) = $Gui_Checked Then $run = "win child class ""Shell_TrayWnd"" show class ""button"" "
If GUICtrlRead($Radio12) = $Gui_Checked Then $run = 'win child class "Shell_TrayWnd" hide class "TrayClockWClass"'
If GUICtrlRead($Radio13) = $Gui_Checked Then $run = 'win child class "Shell_TrayWnd" show class "TrayClockWClass"'
If GUICtrlRead($Radio14) = $Gui_Checked Then $set = 2
If GUICtrlRead($Radio15) = $Gui_Checked Then $run = 'regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 0'
If GUICtrlRead($Radio17) = $Gui_Checked Then $run = 'regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 1'
If $set = 1 Then
$prozent = InputBox("setsystemvolume","Gib in Prozent die Lautstärke ein!","100")
If @error Then ContinueLoop
If $prozent > 100 Then _error("Die Zahl kann nicht großer als 100 sein!")
$run = "setsysvolume "&Round(($prozent*65535)/100)
ClipPut("setsysvolume "&Round(($prozent*65535)/100))
EndIf
If $set = 2 Then
$setdisp = InputBox("setdisplay","Gib wie im Beispiel die Werte ein die dein Desktop haben soll",@DesktopWidth&" "&@DesktopHeight&" "&@DesktopDepth)
If @error Then ContinueLoop
$run = "setdisplay "&$setdisp
EndIf
SplashTextOn("",$run,600,20,-1,-1,1)
RunWait("nircmdc.exe "&$run,@ScriptDir,@SW_HIDE)
SplashOff()
;;;;;;;
EndSelect
WEnd
Exit
Func _error($text)
MsgBox(16,"Error!",$text)
Exit
EndFunc
Alles anzeigen
und hier noch die exe:
http://www.windows-unattended.de/forum/index.php?act=Attach&type=post&id=3779
Schade dass man hier noch keine sachen anhängen kann