E1M1 Posted December 5, 2009 Posted December 5, 2009 How to make script that sets new wallpaper? If I just overwrite registry values then I have to log off and on to see new wall paper but how to I write script that applies new image instantly? edited
Developers Jos Posted December 5, 2009 Developers Posted December 5, 2009 Did you do a search on "wallpaper" before posting? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
E1M1 Posted December 5, 2009 Author Posted December 5, 2009 I found function but problem is: It cant set *.jpg image as background (it worked fine with *.bmp) anyone know what's wrong? Global $REG_DESKTOP = "HKEY_CURRENT_USER\Control Panel\Desktop" _ChangeDestopWallpaper("C:\Documents and Settings\rain\Desktop\pildid\Picture 001.jpg",2) Func _ChangeDestopWallpaper($img, $style = 0) Local $SPI_SETDESKWALLPAPER = 20 Local $SPIF_UPDATEINIFILE = 1 Local $SPIF_SENDCHANGE = 2 If $style = 1 Then RegWrite($REG_DESKTOP, "TileWallPaper", "REG_SZ", 1) RegWrite($REG_DESKTOP, "WallpaperStyle", "REG_SZ", 0) Else RegWrite($REG_DESKTOP, "TileWallPaper", "REG_SZ", 0) RegWrite($REG_DESKTOP, "WallpaperStyle", "REG_SZ", $style) EndIf DllCall("user32.dll", "int", "SystemParametersInfo", _ "int", $SPI_SETDESKWALLPAPER, _ "int", 0, _ "str", $img, _ "int", BitOR($SPIF_UPDATEINIFILE, $SPIF_SENDCHANGE)) Return 0 EndFunc ;==>_ChangeDestopWallpaper edited
Mobius Posted December 5, 2009 Posted December 5, 2009 On 12/5/2009 at 5:11 PM, 'E1M1 said: I found function but problem is: It cant set *.jpg image as background (it worked fine with *.bmp) anyone know what's wrong?Look here E1M1, that api function only supports bitmaps. When you select a desktop image through the windows gui it creates a bmp copy of that image in the profile directory.
paullab Posted December 18, 2009 Posted December 18, 2009 On 12/5/2009 at 3:30 PM, 'E1M1 said: How to make script that sets new wallpaper? If I just overwrite registry values then I have to log off and on to see new wall paper but how to I write script that applies new image instantly?have a look at this http://www.autoitscript.com/forum/index.php?showtopic=105962&view=findpost&p=748483&hl=wallpaper&fromsearch=1 Wallpaper Rotatorwith overlay, Loop through a folder of wallpaper & another of overlay, then create a combined image and set it as the wallpaperE-Mail passthru, Send any file, even executables via e-mail as plain text. The recipient can then later re-construct them.Slideshow widget, A slideshow widget similar to the Vista onePredictive typing using the Numpad, Predictive typing using the numpad of a keyboar similar to that on a mobile phone (the key is the .t16 file).PSTools Front End, For Remote Admin. Just makes life a lot easier (Demonstrates executing external programs and passing parameters, tabbed form Handling STDIN/STDERR)FTP Helper application Up and Download files from an FTP server demonstrates this and Tooltray TipsShow a Map of your Post-codes/Zip Codes, Uses the Clipboard, Hotkeys, the system tray (incl. menus)Disc/CD/DVD Catalogue, Ideal for all those Covermount Discs (Demonstrates Array handling, executing DOS programs, handling STDIN/STDOUT recursive directory reads, file searching.)YAST , Yet another Stopwatch/Timer (Uses a hotkey, Copies to clipboard, handles multiple events and stays on top)Keyboard Status Indicator , Indicates status of NumLock, Caps Lock and Scroll Lock Keys, demonstrates API calling & System tray Icon Toggling
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now