WildByDesign Posted October 29 Posted October 29 (edited) This example script is a desktop live wallpaper program. It is a combination of MediaPlayerElement - WinRT Xaml Island by @MattyD and Move window behind desktop icons by @Parsix. It basically creates a GUI layer under the desktop icons but above the wallpaper (eg. in a WorkerW window within Program Manager). Features: Configuration file (LiveWallpaper.ini) Plays .mp4 videos and likely many more formats Light on CPU (uses GPU for video processing) Play/Pause video by double-click (can change to single-click in config) Option to Loop video Transparency level (to blend video with your real wallpaper) Start button trigger to play media Multi-monitor support Important Note: To run this, the XAML Islands require the following value in the AutoIt binary manifest: <maxversiontested Id="10.0.18362.1"/> There are two options. The first is ExternalManifest.au3 which essentially drops an external manifest file that includes that value beside your existing AutoIt binaries (eg. AutoIt3.exe.manifest and AutoIt3_x64.exe.manifest). This will allow you to run LiveWallpaper.au3 in your file manager by double-clicking on the script. However, the downside to this method is that it will not work through VSCode or SciTE and therefore you cannot get any ConsoleWrite info if you need it. The second option is Update Manifest.au3 which patches your actual AutoIt binary to include the required maxversiontested value. It makes a backup of your original AutoIt binary and you have to copy the modified one over your original. This is the better method if you want to extend the LiveWallpaper code, run through VSCode or SciTE and add/get console output. If you intend to compile as a binary, that compiled binary needs the maxversiontested value. You need to set the "win10" compatibility flag with AutoIt3Wrapper (already at top of LiveWallpaper.au3) and you need to be using the absolute latest beta version of AutoIt3Wrapper.au3 because the maxversiontested value has been added to it. To Do (possibilities): Option for volume level Option for playback rate Hotkeys etc. Live Wallpaper Videos: I have only tested a bunch of .mp4 videos with this, including 4K. I have included bloom.mp4 which is rather low quality, but I wanted something that people can test with and it's small enough for attachment space. But there are many, many live wallpaper web sites out there. Some videos look good on loop (like a fireplace), while others don't. I'm sure lots of other video formats work. But I have only tested .mp4 and that is the format that most video wallpaper sites use. LiveWallpaper.7z Edited Friday at 05:57 PM by WildByDesign Add support for multi-monitor argumentum, MattyD, SOLVE-SMART and 1 other 4
WildByDesign Posted October 29 Author Posted October 29 I wanted to add that this would not have been possible without help from @pixelsearch, @UEZ, @Nine, @argumentum and of course the two already tagged in the first post. And likely many more that I have learned from in the forum. The amount of helpful guidance here is incredible. So while I am using this functionality for a current project, I wanted to share the exact same functionality here to give back in case anyone wants or needs this as a base for something more.
SOLVE-SMART Posted October 29 Posted October 29 Hi and thank you a lot @WildByDesign for that great work 👌 . I started to have a look at your code and realized it's probably made for the current AutoIt version v3.3.18.0 and not for v3.3.16.1, am I right? I mean you already mentioned the absolute latest beta version of AutoIt3Wrapper.au3, but there are more incompatibilities between the AutoIt versions itself. _IsPressed() has changed from two to three args $CP_UTF8 is unknown in v3.3.16.1 If you simply say: "just update to the new AutoIt version", I am totally fine. But in case there shouldn't be such incompatibilities, this would be easily fixable I guess. Best regards Sven WildByDesign 1 ==> AutoIt related: 🔗 GitHub, 🔗 Discord Server, 🔗 Cheat Sheet, 🔗 autoit-webdriver-boilerplate Spoiler 🌍 Au3Forums 🎲 AutoIt (en) Cheat Sheet 📊 AutoIt limits/defaults 💎 Code Katas: [...] (comming soon) 🎭 Collection of GitHub users with AutoIt projects 🐞 False-Positives 🔮 Me on GitHub 💬 Opinion about new forum sub category 📑 UDF wiki list ✂ VSCode-AutoItSnippets 📑 WebDriver FAQs 👨🏫 WebDriver Tutorial (coming soon)
WildByDesign Posted October 29 Author Posted October 29 (edited) 26 minutes ago, SOLVE-SMART said: I started to have a look at your code and realized it's probably made for the current AutoIt version v3.3.18.0 and not for v3.3.16.1, am I right? I mean you already mentioned the absolute latest beta version of AutoIt3Wrapper.au3, but there are more incompatibilities between the AutoIt versions itself. _IsPressed() has changed from two to three args $CP_UTF8 is unknown in v3.3.16.1 You are 100% right, Sven. You made me realize that I haven’t paid any attention at all regarding compatibility between AutoIt versions. I really appreciate that you pointed that out because I never thought about it. I suppose the easiest way for me to test would be to run several versions side by side. I imagine I would need to have the previous version(s) as portable maybe and run by command lines. I’ll have to think about how to set this up. In the meantime, I will update the script later tonight and I will have to pay closer attention to this going forward. Thank you so much. Edited October 29 by WildByDesign SOLVE-SMART 1
argumentum Posted October 29 Posted October 29 Local Const $CP_UTF8 = 65001 should solve that. For _IsPressed(), people can press F1 to find out what UDF is that in. Easy peasy lemon squeezy SOLVE-SMART 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
WildByDesign Posted October 29 Author Posted October 29 18 minutes ago, argumentum said: Local Const $CP_UTF8 = 65001 should solve that. Thanks. I tried this and it wont seem to work. Since it is already called in APIConvConstants.au3 as: Global Const $CP_UTF8 = 65001 Even if I try to tell it to only do it for a specific AutoIt version, it fails for me on v3.3.18 since it is already declared.
argumentum Posted October 29 Posted October 29 26 minutes ago, argumentum said: Local Const $CP_UTF8 = 65001 should solve that. 4 minutes ago, WildByDesign said: Thanks. I tried this and it wont seem to work. Since it is already called in APIConvConstants.au3 as: Global Const $CP_UTF8 = 65001 Even if I try to tell it to only do it for a specific AutoIt version, it fails for me on v3.3.18 since it is already declared. Local. Inside the function. WildByDesign and SOLVE-SMART 1 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
WildByDesign Posted October 29 Author Posted October 29 8 minutes ago, argumentum said: Local. Inside the function. Bingo! That did it. Thank you for that trick. I had a similar issue like that before with a Global Const and I didn't realize that I could override it with a Local Const within a function. I'm learning something everyday. argumentum 1
WildByDesign Posted October 30 Author Posted October 30 @SOLVE-SMART I updated the script in the first post to support 3.3.16.1. Thanks for letting me know about that. Now I've got a portable setup of 3.3.16.1 so that I can test any of my scripts on as well. argumentum 1
MattyD Posted October 30 Posted October 30 Just be aware that the function which actually uses $CP_UTF8 (_WinAPI_MultiByteToWideChar) has also changed since the update.... The old version of this doesn't work as the strings in the metadata files aren't null-terminated. Not that we're necessarily calling this func in this project - but just FYI! SOLVE-SMART and WildByDesign 2
SOLVE-SMART Posted October 30 Posted October 30 Hi folks, hi @WildByDesign 👋 , I really appreciate your effort regarding the compatibility 😊 . But let me also mention that you shouldn't try to respect to much AutoIt versions in the backwards compatibility direction. People should (as I obviously too), update software from time to time. In my case I don't use AutoIt regularly anymore and I saw the changelog of the new AutoIt version (when 3.3.18.0 was released) and I didn't want to adjust several of my older projects to apply with these changes. Anyway, this is my problem not yours. Of course it would be fine if there is a backwards compatibility, but not down to 3.3.12.* or so (in my opinion). 4 hours ago, WildByDesign said: I updated the script in the first post to support 3.3.16.1. Thanks for letting me know about that. I try to give you feedback today or tomorrow 🤝 . Best regards Sven ==> AutoIt related: 🔗 GitHub, 🔗 Discord Server, 🔗 Cheat Sheet, 🔗 autoit-webdriver-boilerplate Spoiler 🌍 Au3Forums 🎲 AutoIt (en) Cheat Sheet 📊 AutoIt limits/defaults 💎 Code Katas: [...] (comming soon) 🎭 Collection of GitHub users with AutoIt projects 🐞 False-Positives 🔮 Me on GitHub 💬 Opinion about new forum sub category 📑 UDF wiki list ✂ VSCode-AutoItSnippets 📑 WebDriver FAQs 👨🏫 WebDriver Tutorial (coming soon)
argumentum Posted October 30 Posted October 30 8 hours ago, MattyD said: the function which actually uses $CP_UTF8 (_WinAPI_MultiByteToWideChar) has also changed since the update.... 5 hours ago, SOLVE-SMART said: saw the changelog of the new AutoIt version (when 3.3.18.0 was released) and I didn't want to adjust several of my older projects to apply with these changes. On that point I should confess that I haven't updated my everyday PC to the latest version and that have projects still in v3.3.14.2 on other PCs ( quite shamelessly too ). If I had to start a new project, it'd be advisable to use the latest. In this case, that is so involved with the OS, is more important than just a SQLite script ( for example ), were the GUI is just to have a working interface. So yes, I too am of the opinion that you should focus the project on the updated engine/stub and it's UDFs. And as you've discovered yourself, a portable instance of other versions are quite simple to have. ( suck on that python !. ppl had to invent "Docker" to solve your issues ! ) WildByDesign and SOLVE-SMART 2 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
WildByDesign Posted November 3 Author Posted November 3 I updated the script in the first post to add an option in the config file (default is enabled) to use the Start button as a trigger to play the media. It doesn't make as much sense for when loop is enabled and it doesn't make sense with all live wallpaper media files. However, with the example bloom.mp4 and not looping, it looks pretty cool to play the bloom animation whenever the Start button is clicked. The Start button trigger works on Windows 11 and should work on Windows 10 but I haven't tested it on 10. I also made the video playback smoother, especially with 4K media. Apparently it is a known issue with MediaPlayerElement on higher resolution videos that the videos can stutter at times, particularly when looping or in general at the moment when the video comes to the end and starts playing again at the beginning. I read that, as a workaround, some developers would just start the video again at the beginning once the video gets close to the end. So I did the same. The system doesn't have to work as hard this way at those specific moments. I take note of the media duration and when the video gets to less than 0.3 of a second, it pauses it there if loop is not enabled and if loop is enabled it sets the position back to the start of the video to continue its loop. The end results were worthwhile, whether looping or not. On 10/30/2025 at 12:33 AM, SOLVE-SMART said: Of course it would be fine if there is a backwards compatibility, but not down to 3.3.12.* or so (in my opinion). I agree. I think that it makes sense to support the current AutoIt version plus the most recent version before it. That seems appropriate especially since AutoIt generally has quite a lot of time in between each release. On 10/30/2025 at 6:02 AM, argumentum said: And as you've discovered yourself, a portable instance of other versions are quite simple to have. This has been incredibly helpful. The best part is that the AutoIt extension that I use for VSCodium makes it really easy to switch between AutoIt directories in the settings. So it's very quick for me now to test scripts between different AutoIt versions. argumentum 1
WildByDesign Posted November 6 Author Posted November 6 (edited) Can somebody with a multiple monitor setup please help me test the latest script in the first post? I actually had a few people ask me for multi-monitor support. They wanted an option for the live wallpaper video to display on all monitors. So this has now become my first project with multi-monitor support and per-monitor DPI scaling. I have tested it on my own setup with two monitors and it has worked really well so far. I also added the support for triggering the video play by clicking on the Start button and/or pressing the Win key. Thanks to @Nine for the help with that. I added MultiMonitorEnabled to the config file to enable/disable the multi-monitor functionality. All monitors should show the video pausing and playing when triggering via Start menu trigger or double-clicking on the desktop. Please let me know if there are any issues. EDIT: The idea is that all monitors pause/play the live wallpaper video synchronously. There is no plan to control them separately because I think that would be quite silly. Edited November 6 by WildByDesign
argumentum Posted November 6 Posted November 6 14 minutes ago, WildByDesign said: Can somebody with a multiple monitor setup If you can spend some $30 + $80 you too can have one. Call it investment WildByDesign 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
argumentum Posted November 6 Posted November 6 ... <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <application> <!--The ID below indicates application support for Windows Vista --> <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> <!--The ID below indicates application support for Windows 7 --> <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <!--The ID below indicates application support for Windows 8 --> <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> <!--The ID below indicates application support for Windows 8.1 --> <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> <!--The ID below indicates application support for Windows 10 --> <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> </application> </compatibility> </assembly> ... Runed it with the above. Did black out both monitors and restored the wallpaper just fine. But did not play the included bloom.mp4. Maybe because I need to patch the exe/wrapper ? WildByDesign 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
WildByDesign Posted November 6 Author Posted November 6 16 minutes ago, argumentum said: If you can spend some $30 + $80 you too can have one. Call it investment That does sound like a smart investment! I ended up testing it by hooking up my laptop to my TV with an HDMI cable and setting it to extended multi-monitor option. It worked good. But I can't imagine someone running it on 3 or 4 screens. 5 minutes ago, argumentum said: Runed it with the above. Did black out both monitors and restored the wallpaper just fine. But did not play the included bloom.mp4. Maybe because I need to patch the exe/wrapper ? Thank you for testing. Yes, if it's just black screen with no video that just means it needs to be patched, you're right. But that black screen is enough for me to confirm that it went to all screens properly. And as long as all screens were 100% covered black, that means that the GUI measurements were good too. But if there were some gaps that were not black, that means my math is bad again. 😀 argumentum 1
WildByDesign Posted November 6 Author Posted November 6 9 minutes ago, argumentum said: Maybe because I need to patch the exe/wrapper ? Also compiled to exe is easier than patching the AutoIt binaries, but it does require using the latest AutoIt3Wrapper script from the beta directory. argumentum 1
argumentum Posted November 6 Posted November 6 4 minutes ago, WildByDesign said: it does require using the latest AutoIt3Wrapper script from the beta directory Ok !. Did it and it played in both monitors. Now, one of them is an ultrawide one ( 2560x1080 ) and saw black bars on each side. It would be nice to take that into account and display proportional but with the greater size ( width or height ) into consideration. So how ?!. Well, stand your monitor on it's side ( or just in your head ) and on portrait orientation to test on your side and confirm your math WildByDesign 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
WildByDesign Posted November 6 Author Posted November 6 4 minutes ago, argumentum said: Now, one of them is an ultrawide one ( 2560x1080 ) and saw black bars on each side. It would be nice to take that into account and display proportional but with the greater size ( width or height ) into consideration. This is something that I definitely will have to look into. The pixel size of all monitors comes directly from _WinAPI_EnumDisplayMonitors and the GUI size for each monitor comes from there. I have a feeling that it might have something to do with MediaPlayerElement.Stretch Property. It has video stretch options such as: None, Fill, UniformToFill and Uniform That is one thing that I struggling with setting with the MediaPlayerElement stuff. No matter what I did, it failed. So it stayed as default. The default option of Uniform can leave the black bars depending on the aspect ratio of the video. @MattyD Do you know much about this? We can talk about it here or in your thread, it's up to you. But I had previously tried the various *SetStretch functions and never had any luck. I could always run the *GetStretch functions and get returns. Setting them never worked for me though. argumentum 1
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