| |
|
|
RGH | One code-shred a currently erstelltem utility. Getestet under Win XP SP 2.
' Screen saver one-/switch off
'Backgroundcolor the Desktops take on
'Wallpapers select or Remove
'RGH 17.07.2008
$H windows.ph
' Screensaver one-/switch off
' -----------------------
' switch% - 1 = one / 0 = from
proc setsaver
Parameters switch%
if switch% = 0
WriteIni "HKEY_1","Control Panel\Desktop", "ScreenSaveActive" = "0"
WriteIni "HKEY_1","Software\Policies\Microsoft\windows\Control Panel\Desktop", "ScreenSaveActive" = "0"
else
WriteIni "HKEY_1","Control Panel\Desktop", "ScreenSaveActive" = "1"
WriteIni "HKEY_1","Software\Policies\Microsoft\windows\Control Panel\Desktop", "ScreenSaveActive" = "1"
endif
endproc
'Backgroundcolor take on
' ---------------------------
' farbe& - RGB-worth the colour
proc setcolor
parameters farbe&
declare elem&[0], color&[0]
elem&[0] = ~COLOR_DESKTOP
color&[0] = farbe&
~SetSysColors(1, addr(elem&[0]), addr(color&[0]))
endproc
'Wallpapers take on
' ---------------------------
' presentment$ - Dateiname to that Wallpapers
proc setpic
parameters presentment$
if presentment$ > ""
WriteIni "HKEY_1","Control Panel\Desktop", "WallpaperStyle" = "3"
WriteIni "HKEY_1","Control Panel\Desktop", "TileWallpaper" = "2"
WriteIni "HKEY_1","Control Panel\Desktop", "Wallpaper" = presentment$
~SystemParametersInfo(~SPI_SETDESKWALLPAPER, 0, addr(presentment$), ~SPIF_SENDCHANGE)
else Wallpapers switch off
WriteIni "HKEY_1","Control Panel\Desktop", "WallpaperStyle" = "0"
WriteIni "HKEY_1","Control Panel\Desktop", "TileWallpaper" = "0"
WriteIni "HKEY_1","Control Panel\Desktop", "Wallpaper" = ""
~SystemParametersInfo(~SPI_SETDESKWALLPAPER, 0, addr(presentment$), ~SPIF_SENDCHANGE)
endif
endproc
Greeting Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 07/17/08 ▲ |
|
|
|
|
| Hello Roland, XPSE [...] meckerte "unbekannte Escapesequenz" in
WriteIni "HKEY_1","Software\PoliciesMicrosoft\windows\Control Panel\Desktop", "ScreenSaveActive" = "0"
have your Sourcecode supra dahingehend korrigiert.
code functions super! |
|
|
| |
|
|
|
RGH | iF
have your Sourcecode supra dahingehend korrigiert.
Thank you!
Greeting Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 07/17/08 ▲ |
|
|
|