diff --git a/season_wallpaper.vbs b/season_wallpaper.vbs new file mode 100644 index 0000000..934e78b --- /dev/null +++ b/season_wallpaper.vbs @@ -0,0 +1,138 @@ +'Copyright © 2020 Чечкенёв Андрей +' +'This program is free software: you can redistribute it and/or modify +'it under the terms of the GNU General Public License as published by +'the Free Software Foundation, either version 3 of the License, or +'(at your option) any later version. +' +'This program is distributed in the hope that it will be useful, +'but WITHOUT ANY WARRANTY; without even the implied warranty of +'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'GNU General Public License for more details. +' +'You should have received a copy of the GNU General Public License +'along with this program. If not, see . + +'Season Wallpaper for Windows +'by Chechkenev Andrew (DarkCat09/CodePicker13) + + +'USED PICTURES +'############################################################################################################### +' +'Winter: http://fonday.ru/info/16812-4168121db61.html +' https://www.rabstol.net/oboi/winter/1288-russkaya-zima.html +' https://zastavok.net/zima/54902-gory_zima_sneg_eli_vershiny.html +' https://astrologics.ru/wp-content/uploads/2020/01/Goroskop-na-nedelyu-27-yanvarya-2-fevralya.jpg +' +'Spring: http://dom-cvety.com/photo/vesna/1472-krasivye-oboi-vesna.html#photo +' https://nicefon.ru/oboi/vesna_oboi_cveta_radugi_krasota_kartinki_cvety.html +' http://wallpapers-image.ru/1920x1080/spring/shirokoformatnye-oboi-hd-vesna-1920x1080.php +' https://mebel-go.ru/photo/9710-skachat_zhivye_oboi_na_rabochiy_stol_vesna.html +' +'Summer: https://zastavok.net/leto/54677-pole_rozh_nebo_oblaka_goluboe_nebo_leto.html +' https://nicefon.ru/oboi/derevyya_les_leto_otraghenie_zeleny_priroda_ozero.html +' https://wallpapers.99px.ru/wallpapers/309335/ +' +'Autumn: https://www.rabstol.net/oboi/gardens/10379-solnechnaya-osen.html +' http://wallpapers-images.ru/1920x1080/autumn/oboi_osen_1920x1080.php +' http://wallpapers-image.ru/1920x1080/autumn/oboi-osen-kartinki-autumn-1920x1080.php +' http://wallpapers-image.ru/1280x1024/autumn/oboi-osen-foto-wallpapers-autumn-1280x1024.php +' https://www.goodfon.ru/download/voda-klen-listia-osen/2560x1440/ +' +'############################################################################################################### + +On Error Resume Next +Dim seasonsWp(4) +Dim monthsWp(12) +Dim Wsh, FSO + +'USER PREFERENCES +'True - enabled, False - disabled. +'########################################################################################## + +'+++++++ MAIN PREFS ++++++ + +enableWpChanging = True 'Enabling main functionally of this script +backupPreviousWp = True 'Enabling backuping previous wallpaper (not season-wp) +changeWpEveryMonth = False 'Enabling changing wallpaper every month, instead of season + +'+++++++++++++++++++++++++ + + +'----- WP FOR SEASONS ---- + +seasonsWp(0) = -1 'use -1 for random picture. This is a winter. +seasonsWp(1) = 4 ' This is a spring. +seasonsWp(2) = -1 ' This is a summer. +seasonsWp(3) = 5 ' This is an autumn. + +'------------------------- + + +'***** WP FOR MONTHS ***** + +'If changeWpEveryMonth is disabled, the following options will not work + +monthsWp(11) = "1.jpg" 'wallpaper on December. I recommend use 1st picture. +monthsWp(0) = "2.jpg" 'wallpaper on January. I recommend use 2nd picture for light theme, and 3rd picture for dark theme. +monthsWp(1) = "4.jpg" 'wallpaper on Febraury. I recommend use 4th picture. + +monthsWp(2) = "1.jpg" 'wallpaper on March. +monthsWp(3) = "2.jpg" 'wallpaper on April. I recommend use 2nd picture. +monthsWp(4) = "4.jpg" 'wallpaper on May. + +monthsWp(5) = "1.jpg" 'wallpaper on June. I recommend use 1st picture. +monthsWp(6) = "2.jpg" 'wallpaper on July. I recommend use 2nd picture. +monthsWp(7) = "3.jpg" 'wallpaper on August. I recommend use 3rd picture. + +monthsWp(8) = "2.jpg" 'wallpaper on September. +monthsWp(9) = "3.jpg" 'wallpaper on October. +monthsWp(10) = "5.jpg" 'wallpaper on November. I recommend use 5th picture. + +'************************* + +'########################################################################################## + +Set Wsh = CreateObject("WScript.Shell") +Set FSO = CreateObject("Scripting.FileSystemObject") +curMonth = Month(Date()) + +If (curMonth = 12) or (curMonth > 0 and curMonth < 3) then +curSeason = "winter,0" + +ElseIf curMonth > 2 and curMonth < 6 then +curSeason = "spring,1" + +ElseIf curMonth > 5 and curMonth < 9 then +curSeason = "summer,2" + +ElseIf curMonth > 8 and curMonth < 12 then +curSeason = "autumn,3" +End If + + +If changeWpEveryMonth then + +curWp = monthsWp(curMonth-1) + +Else + +If seasonsWp(CInt(Split(curSeason, ",")(1))) = -1 then +Randomize +curWp = (Int(Rnd*(FSO.GetFolder(Wsh.CurrentDirectory & "\wallpapers\" & Split(curSeason, ",")(0)).Files.Count))+1) & ".jpg" + +Else +curWp = seasonsWp(CInt(Split(curSeason, ",")(1))) & ".jpg" +End If +End If + +If backupPreviousWp then + +prevWp = Wsh.RegRead("HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper") +FSO.CopyFile prevWp, Wsh.CurrentDirectory & "\wallpapers\backup." & Split(prevWp, ".")(UBound(Split(prevWp, "."))), True +End If + +curWp = Wsh.CurrentDirectory & "\wallpapers\" & Split(curSeason, ",")(0) & "\" & curWp +Wsh.RegWrite "HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper", curWp, "REG_SZ" +Wsh.Run """%SystemRoot%\System32\RUNDLL32.EXE"" user32.dll,UpdatePerUserSystemParameters", 1, True diff --git a/wallpapers/autumn/1.jpg b/wallpapers/autumn/1.jpg new file mode 100644 index 0000000..c99e54b Binary files /dev/null and b/wallpapers/autumn/1.jpg differ diff --git a/wallpapers/autumn/2.jpg b/wallpapers/autumn/2.jpg new file mode 100644 index 0000000..a38f966 Binary files /dev/null and b/wallpapers/autumn/2.jpg differ diff --git a/wallpapers/autumn/3.jpg b/wallpapers/autumn/3.jpg new file mode 100644 index 0000000..8289db2 Binary files /dev/null and b/wallpapers/autumn/3.jpg differ diff --git a/wallpapers/autumn/4.jpg b/wallpapers/autumn/4.jpg new file mode 100644 index 0000000..251b6bf Binary files /dev/null and b/wallpapers/autumn/4.jpg differ diff --git a/wallpapers/autumn/5.jpg b/wallpapers/autumn/5.jpg new file mode 100644 index 0000000..44207f7 Binary files /dev/null and b/wallpapers/autumn/5.jpg differ diff --git a/wallpapers/spring/1.jpg b/wallpapers/spring/1.jpg new file mode 100644 index 0000000..8b1f744 Binary files /dev/null and b/wallpapers/spring/1.jpg differ diff --git a/wallpapers/spring/2.jpg b/wallpapers/spring/2.jpg new file mode 100644 index 0000000..d01e590 Binary files /dev/null and b/wallpapers/spring/2.jpg differ diff --git a/wallpapers/spring/3.jpg b/wallpapers/spring/3.jpg new file mode 100644 index 0000000..5fcb0ca Binary files /dev/null and b/wallpapers/spring/3.jpg differ diff --git a/wallpapers/spring/4.jpg b/wallpapers/spring/4.jpg new file mode 100644 index 0000000..6fcf7a6 Binary files /dev/null and b/wallpapers/spring/4.jpg differ diff --git a/wallpapers/spring/5.jpg b/wallpapers/spring/5.jpg new file mode 100644 index 0000000..d74574c Binary files /dev/null and b/wallpapers/spring/5.jpg differ diff --git a/wallpapers/summer/1.jpg b/wallpapers/summer/1.jpg new file mode 100644 index 0000000..4b64a5c Binary files /dev/null and b/wallpapers/summer/1.jpg differ diff --git a/wallpapers/summer/2.jpg b/wallpapers/summer/2.jpg new file mode 100644 index 0000000..94c5ab8 Binary files /dev/null and b/wallpapers/summer/2.jpg differ diff --git a/wallpapers/summer/3.jpg b/wallpapers/summer/3.jpg new file mode 100644 index 0000000..384d4ca Binary files /dev/null and b/wallpapers/summer/3.jpg differ diff --git a/wallpapers/winter/1.jpg b/wallpapers/winter/1.jpg new file mode 100644 index 0000000..6c1367e Binary files /dev/null and b/wallpapers/winter/1.jpg differ diff --git a/wallpapers/winter/2.jpg b/wallpapers/winter/2.jpg new file mode 100644 index 0000000..e73db21 Binary files /dev/null and b/wallpapers/winter/2.jpg differ diff --git a/wallpapers/winter/3.jpg b/wallpapers/winter/3.jpg new file mode 100644 index 0000000..1ff2708 Binary files /dev/null and b/wallpapers/winter/3.jpg differ diff --git a/wallpapers/winter/4.jpg b/wallpapers/winter/4.jpg new file mode 100644 index 0000000..2124ac5 Binary files /dev/null and b/wallpapers/winter/4.jpg differ