A follow-up in case someone else is interested in using Irfanview to quickly change wallpaper from a taskbar icon. It's actually kind of nice, provided you keep the desktop relatively clean of desktop icons, since clicking the taskbar button becomes a photo viewer of sorts. If you establish an XY PaperFolder of bunch of different photos from areas you visited (or whatever). You could set one taskbar icon as a wallpaper changer for pictures of Japan another for Hawaii etc.
As I mentioned earlier since XY's PaperFolders are encoded UTF-16LE, Irfanview does not read them properly. So we have to encode the file as ANSI for use with Irfanview. The command line or Target box for the taskbar icon would look something like this: Note: hstart is a free command line tool which will hide the DOS command line console (see link in highend's post above).
Code: Select all
D:\Tools\Hstart\hstart64.exe /NOCONSOLE "D:\Tools\XYplorer\Scripts\WallpaperChanger.bat Maine"
The PaperFolder the batch is referring to is:
Code: Select all
D:\Tools\XYplorer\Paper\Wallpaper\Maine.txt
So that I don't need to have a separate batch file for each PaperFolder, I made a batch file (WallpaperChanger.bat) referred to in the taskbar's command line Target box. This is what the batch file looks like:
Code: Select all
@echo off
set ARG=%1
REM You may also need the following line in other countries (e.g., Germany )
REM @chcp 1258 >NUL
@chcp 1252 >NUL
@type D:\Tools\XYplorer\Paper\Wallpaper\%ARG%.txt>D:\Temp\wallpaper.txt
D:\Graphics\IrfanView\i_view32.exe /filelist=D:\Temp\wallpaper.txt /random /wall=3 /killmesoftly
DEL /Q D:\Temp\wallpaper.txt
You obviously would have to change folder locations, but this way you can use the same batch file for each taskbar icon. As you can see from the batch file, it uses the fist parameter to direct it to the proper PaperFolder, in this case "Maine". The "wallpaper.txt" file is deleted after use. Previous to this I had to have a separate text file with the listing of images which was ANSI encoded. With this method I can use the actual Paperfolder text file and not have to worry about keeping another ANSI version of the file up to date. The image files I select for use in the PaperFolder are ones that I've converted or cropped to the aspect ratio of my screen.
Ken
Edit: Incorporated comments below.