Jump to content

Recommended Posts

Posted (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

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
  • Start on trigger (when logging in, when clicking Start menu, etc.)
  • 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 by WildByDesign
Updated to support 3.3.16.1
Posted

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.

Posted

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

==> 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)

Posted (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 by WildByDesign
Posted
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.

Posted
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.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted
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. :)

Posted

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!

Posted

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)

Posted
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 !  :ranting: )  :lol:

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted

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.

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
  • Recently Browsing   0 members

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