Jump to content
  1. AlmarM


  2. Xandy


  3. DatMCEyeBall


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By cramaboule
      Autoit Airliners.net wallpaper changer Works from XP to W10
    • By matty45
      Hi, i have tried to use many scripts to change a pcs wallpaper but they dont work.
      This script sets the wallpaper but does not refresh it.  Any idea what the problem is?
      #include <SendMessage.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #include <Misc.au3> #RequireAdmin $UrlDownload = "http://examplesite.org/test.bmp" ;DL link $Directory = "C:\test.bmp" ;Name of your file Local $download = InetGet($UrlDownload, $Directory,0,1) ; download in the background Do Sleep(100) Until InetGetInfo($download, 2) ;Checks to see if $download is completed (param 2) InetClose($download) RunWait($Directory) ;it will pause the script untill the process of the downloaded file is finished RegWrite ("HKEY_CURRENT_USER\Control Panel\Desktop", "wallpaper", "REG_SZ", "C:\test.bmp" ) Dim $hWnd = WinGetHandle('[CLASS:Progman]') _SendMessage($hWnd, $WM_COMMAND, 0x0001A220) Thanks
    • By Sori
      While looking for a way to change my desktop background of only my secondary monitor, I found a few simple solutions that are built into Windows. But when you look up how to do such with a slideshow... You only find programs that cost money. So, I set out to make it myself.This is a pretty basic program. It simply displays an image in the center of the screen (scaled to fit screen) and uses a black background.The program does allow mouse passthrough, though you can't drag and drop over it, so it wouldn't really work well if you have icons on your second monitor. #include <File.au3> #include <GUIConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <EditConstants.au3> #include <Misc.au3> #include <Array.au3> #include <GDIPlus.au3> ;User Changeable Variables ;======================================================================== $pictureFolder = "D:\Wallpapers" $changeTime = 5 ;Seconds Global $smWidth = 1600 Global $smHeight = 900 Global $monitorPosition = "Right" ;Global $monitorPosition = "Left" ;======================================================================== Global $imageList = _FileListToArray($pictureFolder) Global $imageCount = $imageList[0] Global $imageHeight, $imageWidth, $pHeight, $pWidth, $pic, $gdiPic _GDIPlus_Startup() OnAutoItExitRegister("CloseProgram") $GUIStyle = BitOR($WS_POPUP, $WS_VISIBLE, $HWND_BOTTOM) ;Popup, Visible, Window on Bottom $GUIStyleEx = BitOR($WS_EX_TRANSPARENT, $WS_EX_TOOLWINDOW) ;Allow Passthrough, Hide from Alt+Tab $Parent = WinGetHandle('Program Manager', '') ;Sets parent to the program manager, allowing you to right click the desktop If $monitorPosition = "Right" Then $GUI = GUICreate("Secondary Wallpaper", $smWidth, $smHeight, @DesktopWidth, 0, $GUIStyle, $GUIStyleEx, $Parent) Else $GUI = GUICreate("Secondary Wallpaper", $smWidth, $smHeight, (-1 * @DesktopWidth), 0, $GUIStyle, $GUIStyleEx, $Parent) EndIf GUISetBkColor(0, $GUI) _WinAPI_SetWindowPos($GUI, $HWND_BOTTOM, 0, 0, 0, 0, BitOR($SWP_NOACTIVATE, $SWP_NOMOVE, $SWP_NOSIZE, $SWP_SHOWWINDOW)) ;Forces window to bottom of screen WinSetTrans($GUI, '', 255) ;Sets Window Visible Transparency: Required for mouse passthrough ChangeImage() GUISetState(@SW_SHOW) ;Show GUI While 1 Sleep($changeTime * 1000) ChangeImage() WEnd Func ChangeImage() $picName = Random(1, $imageCount, 1) ;Get Dimensions of image GetDimensions($imageList[$picName]) $imageHeight = $pHeight $imageWidth = $pWidth ;Turn them all into integers. (Fixes glitch that caused some images to skip resizing) $imageHeight = Int($imageHeight) $imageWidth = Int($imageWidth) $smHeight = Int($smHeight) $smWidth = Int($smWidth) ;Adjust the image size ;----------------------------------------------- ;If the image is bigger than the screen, adjust it If $imageWidth > $smWidth = 1 Or $imageHeight > $smHeight = 1 Then ;Calculate Aspect Ratio of image $aspectRatioX = $smWidth / $imageWidth $aspectRatioY = $smHeight / $imageHeight If $aspectRatioX < $aspectRatioY Then $scaleFactor = $aspectRatioX Else $scaleFactor = $aspectRatioY EndIf $imageHeight = $imageHeight * $scaleFactor $imageWidth = $imageWidth * $scaleFactor ;Else ;Image is smaller/same size as monitor EndIf ;Calculate Center of monitor ;(Monitor size - image size) / 2 $smCenterX = ($smWidth - $imageWidth) / 2 $smCenterY = ($smHeight - $imageHeight) / 2 ;Resize the image $hHBmp = $pictureFolder & "\" & $imageList[$picName] $gdiPic = _GDIPlus_BitmapCreateFromFile($hHBmp) ;convert GDI bitmap to GDI+ bitmap _GDIPlus_BitmapDispose($pic) $pic = _GDIPlus_ImageResize($gdiPic, $imageWidth, $imageHeight) ;resize image _GDIPlus_BitmapDispose($gdiPic) GUISetBkColor(0, $GUI) Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND($GUI) ;create a graphics object from a window handle $gdiPic = _GDIPlus_BitmapCreateFromFile($pictureFolder & "\" & $imageList[$picName]) _GDIPlus_GraphicsDrawImage($hGraphics, $pic, $smCenterX, $smCenterY) ;display scaled image _GDIPlus_GraphicsDispose($hGraphics) ;Garbage Cleanup EndFunc ;==>ChangeImage Func GetDimensions($picName) Local $prop, $dArray, $fileSize, $imageDimensionsGDI $path = $pictureFolder & "\" & $picName $fileSize = FileGetSize($path) ;Save information to registry for faster access. Compare size of picture to verify changes to picture If $fileSize <> RegRead("HKEY_CURRENT_USER\Software\Secondary Wallpaper\Pictures", $picName & " Size") Then ;File sizes do not match RegWrite("HKEY_CURRENT_USER\Software\Secondary Wallpaper\Pictures", $picName & " Size", "REG_SZ", $fileSize) $imageDimensionsGDI = _GDIPlus_ImageLoadFromFile($path) $pWidth = _GDIPlus_ImageGetWidth($imageDimensionsGDI) $pHeight = _GDIPlus_ImageGetHeight($imageDimensionsGDI) _GDIPlus_ImageDispose($imageDimensionsGDI) RegWrite("HKEY_CURRENT_USER\Software\Secondary Wallpaper\Pictures", $picName & " Width", "REG_SZ", $pWidth) RegWrite("HKEY_CURRENT_USER\Software\Secondary Wallpaper\Pictures", $picName & " Height", "REG_SZ", $pHeight) Else ;File sizes match $pWidth = RegRead("HKEY_CURRENT_USER\Software\Secondary Wallpaper\Pictures", $picName & " Width") $pHeight = RegRead("HKEY_CURRENT_USER\Software\Secondary Wallpaper\Pictures", $picName & " Height") If $pWidth = "-1" Or $pHeight = "-1" Then RegWrite("HKEY_CURRENT_USER\Software\Secondary Wallpaper\Pictures", $picName & " Size", "REG_SZ", $fileSize) $imageDimensionsGDI = _GDIPlus_ImageLoadFromFile($path) $pWidth = _GDIPlus_ImageGetWidth($imageDimensionsGDI) $pHeight = _GDIPlus_ImageGetHeight($imageDimensionsGDI) _GDIPlus_ImageDispose($imageDimensionsGDI) RegWrite("HKEY_CURRENT_USER\Software\Secondary Wallpaper\Pictures", $picName & " Width", "REG_SZ", $pWidth) RegWrite("HKEY_CURRENT_USER\Software\Secondary Wallpaper\Pictures", $picName & " Height", "REG_SZ", $pHeight) EndIf EndIf EndFunc ;==>GetDimensions Func CloseProgram() ;Garbage Cleanup _GDIPlus_GraphicsDispose($gdiPic) _GDIPlus_Shutdown() EndFunc ;==>CloseProgram  
      Secondary Wallpaper.au3
    • By wakillon
      WallpaperBank allows you to use more than 26,000 online wallpapers from 3 websites :


      Wallpapers are downloaded and displayed after a random selection.
      The fifteenth category is disabled by default but can be enabled line 159.

      You can add current Wallpaper to a favorites or a banned directory (Attention there is yet some doublons).
      You can also use your own Wallpapers by selecting the "Yours" type.
      Landscape is the default type.
      Jpg, png, gif, bmp Wallpaper formats are supported.
      Access Settings by Tray Menu.

      Double click on tray icon for quickly change to a random Wallpaper of the selected category.

      External files and also includes are embbeded in script for compatibility with previous AutoIt version.
      Tested on xpsp3, win7x64 and win8.1x64

      Executable : WallpaperBank.exe
    • By wakillon
      Easily Crop a picture to a wanted dimension
      and set your Windows desktop background wallpaper without stretching or distorting it.

      Drag'n drop a Picture for load it.
      Drag it for position it and use mouse wheel for zoom - unzoom it.(TouchPad users need to plug a Mouse )
      Select dimensions and format you want for save your wallpaper.
      Pictures with transparency are supported.
      By default Pictures are saved on your desktop.

      Tips :
      Hold Left Ctrl key for move the photo more slowly.
      Hold Left Shift key for move the photo more quickly.
      Hold Left Shift key for Zoom/UnZoom more quickly.
      Hold Left Shift key when drag'n drop photo for work with a best quality. (Moves and Zoom are more slow)

      Executable : WallpaperCropper.exe
  • Create New...