Jump to content

Bing Desktop Wallpaper Saver


cyberguy91
 Share

Recommended Posts

I realize this is a bit niche, but useful nonetheless. This is a script that saves the daily wallpaper from the Bing Desktop application.

It checks to see if Bing Desktop is installed, checks to see if an image has been downloaded by the application, then attempts to copy it, checking to see if the image has already been saved, in which case it offers to overwrite the image.

; Bing Desktop Wallpaper Saver
; Created by cyberguy91
; 04/28/2012
;Image Destination
$dest = @UserProfileDir & "\Pictures\BingWallpaper " & @MON & "-" & @MDAY & "-" & @YEAR & ".jpg"
;Check that Bing Desktop is installed
$check = FileExists(@ProgramFilesDir & "\Microsoft\BingDesktop\")
If $check = True Then
saveimage()
Else
MsgBox(1, "Error", "Bing Desktop is not installed.")
EndIf
;Image Saving Function
Func saveimage()
If FileExists(@UserProfileDir & "\AppData\Local\Microsoft\BingDesktop\themes\image.jpg") = True Then
  If FileExists($dest) Then
   $exists = MsgBox(4, "Error", "The file already exists. Overwrite?")
   Select
    Case $exists = 6
     FileCopy(@UserProfileDir & "\AppData\Local\Microsoft\BingDesktop\themes\image.jpg", $dest, 1)
     Exit
    Case $exists = 7
     Exit
   EndSelect
  Else
   FileCopy(@UserProfileDir & "\AppData\Local\Microsoft\BingDesktop\themes\image.jpg", $dest)
  EndIf
Else
  MsgBox(1, "Error", 'Could not locate image. Are you sure you have selected "Make the daily homepage image your background desktop" in Bing Desktop?')
EndIf
EndFunc   ;==>saveimage
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...