Ich suche nach einer Möglichkeit, den Desktophintergrund stets mit einem HTML-Dokument zu aktualisieren.
Für -bmp`s habe ich schon eine Möglichkeit gefunden (
Spoiler anzeigen
Dim $favDir = 'C:\Downloads\Wallpapers\favorites\'
[/autoit] [autoit][/autoit] [autoit]Dim $cCounter = 0
Dim $FindFile = FileFindFirstFile($favDir & '*.bmp')
While 1
FileFindNextFile($FindFile)
If @error Then ExitLoop
$cCounter = $cCounter + 1
WEnd
FileClose($FindFile)
$FindFile = FileFindFirstFile($favDir & '*.bmp')
Dim $RandomNum = Random(1, $cCounter, 1)
Dim $curFile
For $i = 1 To $RandomNum
$curFile = FileFindNextFile($FindFile)
If $RandomNum = $i Then
ChangeDesktopWallpaper($favDir & $curFile)
ExitLoop
EndIf
Next
FileClose($FindFile)
[/autoit] [autoit][/autoit] [autoit]Exit
[/autoit] [autoit][/autoit] [autoit]Func ChangeDesktopWallpaper($bmp)
;===============================================================================
; Usage: _ChangeDesktopWallPaper(@WindowsDir & '\' & 'zapotec.bmp')
; Parameter(s): $bmp - Full Path to BitMap File (*.bmp)
; Requirement(s): None.
; Return Value(s): On Success - Returns 0
; On Failure - -1
;===============================================================================
If Not FileExists($bmp) Then Return -1
;The $SPI* values could be defined elsewhere via #include - if you conflict,
; remove these, or add if Not IsDeclared "SPI_SETDESKWALLPAPER" Logic
Local $SPI_SETDESKWALLPAPER = 20
Local $SPIF_UPDATEINIFILE = 1
Local $SPIF_SENDCHANGE = 2
Local $REG_DESKTOP= "HKEY_CURRENT_USER\Control Panel\Desktop"
;Don't tile - just center
RegWrite($REG_DESKTOP, "TileWallPaper", "REG_SZ", 0)
RegWrite($REG_DESKTOP, "WallpaperStyle", "REG_SZ", 0)
RegWrite($REG_DESKTOP, "Wallpaper", "REG_SZ", $bmp)
DllCall("user32.dll", "int", "SystemParametersInfo", _
"int", $SPI_SETDESKWALLPAPER, _
"int", 0, _
"str", $bmp, _
"int", BitOR($SPIF_UPDATEINIFILE, $SPIF_SENDCHANGE))
Return 0
EndFunc;==>_ChangeDestopWallpaper
), aber wenn ich die Such-Strings in HTML ändere,passiert nichts.
Grundsätzlich ist das ändern von Desktophintergründen mit HMTL mglich,das weiß ich (Win XP SP 2).
Wäre für Hilfe dankbar ![]()
//edit: Doch,es passiert etwas,der Bildschirm wird schwarz ![]()