Jump to content

Recommended Posts

Posted

Well done @MattyD, thank you ๐Ÿ‘ . Oberviously you had to generate (write) many code.

What bothers me a little bit are the many dependencies that you have to include in the projects, "just" to use WinRT MediaPlayer object or XAML controls.
I know there are not much alternatives, but this is the point why I would not use it ๐Ÿ˜” .

  Reveal hidden contents

Don't get me wrong, I appreciate the work and the solution for the use case, but I don't really like it.

Best regards
Sven

==> AutoIt related: ๐Ÿ”— GitHub, ๐Ÿ”— Discord Server, ๐Ÿ”— Cheat Sheet

  Reveal hidden contents
Posted (edited)

yeah fair enough, totally get where you're coming from.

Just to explain though - this uses libraries from the WinRT project which literally has thousands of objects wrapped.
The folder structure is a way for me to drop objects in and out of a project without definitions getting in the way of each other. So we could probably boil all this down to a single header - but it will only be useful for this implementation.   So the setup is more for me I guess!

There are Interface tags in all the interface libraries. So for a more traditional approach with ObjCreateInterface()  I'd probably extract all those and dump them into its own include file.  You'd would also lose the benefits of things like calltips, and a few other perks but you gain a bit more simplicity with the file structure.

Edited by MattyD
Posted

Thanks for the explanation - understood. Sound reasonably.

  On 4/30/2025 at 10:23 AM, MattyD said:

There are Interface tags in all the interface libraries. So for a more traditional approach with ObjCreateInterface()  I'd probably extract all those and dump them into its own include file.  You'd would also lose the benefits of things like calltips, and a few other perks but you gain a bit more simplicity with the file structure.

Expand  

You're right.

On a second thought, I personally have no use case for it at all, but it's still useful, no question ๐Ÿ‘ .

Off-topic:

  Reveal hidden contents

Again: Thanks for the showcase and the effort @MattyD ๐Ÿ‘Œ .

Best regards
Sven

==> AutoIt related: ๐Ÿ”— GitHub, ๐Ÿ”— Discord Server, ๐Ÿ”— Cheat Sheet

  Reveal hidden contents
Posted

Hi all, just a quick one

I've updated the zip in post #1 - its the same thing, but I've included a tool so you can easily update that application manifest.

Posted (edited)

Hi @MattyD

I replaced the original autoit3.exe file with the modified version generated by your script (..?! you know things that I obviously don't know) and in this way MediaPlayer.au3 works.
Then I tried to compile MediaPlayer.au3 but the generated executable does not work (the autoit3.exe file after compilation is still the modified one). Is there any trick to be able to compile MediaPlayer.au3 into a working executable and then restore the original autoit3.exe file in the AutoIt folder?
Bye and thanks

Edited by Gianni

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Posted

 Yeah, there's a couple of options really,

You could just modify that "update manifest.au3" so it replaces the resource in your compiled script (rather than @autoitexe).

But my original approach was to modify AutoItWrapper.au3.  On line 2670 I inserted this.

FileWriteLine($hTempFile2, '            <maxversiontested Id="10.0.18362.1" />')

Then in your script, you need the following directive to trigger that bit of code:

#Autoit3Wrapper_Res_Compatibility=Win10

I don't think the actual build number is critical - I'd imagine things should be OK so long as the build is after win10 1903. Win10 22H2 is 10.0.19045.0 if you wanted to specify something more current!

Posted

I applied the patch to the compiled executable file instead of AutoIt3.exe and that worked. Thanks

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Posted (edited)
  On 5/1/2025 at 11:54 AM, MattyD said:

But my original approach was to modify AutoItWrapper.au3.  On line 2670 I inserted this.

Expand  

In my version of it does not fall under that line.

... ...
                    If StringInStr($INP_Res_Compatibility, "Win10") Then
                    
                        ; https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#maxversiontested
                        FileWriteLine($hTempFile2, '            <!-- Windows 10, version 1903 -->') 
                        FileWriteLine($hTempFile2, '            <maxversiontested Id="10.0.18362.1" />')
                        
                        FileWriteLine($hTempFile2, '            <!--The ID below indicates application support for Windows Vista -->')
... ...

This will be easier to find as beta versions come out.
Thank you for the food code :) 

Edited by argumentum
better

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

Posted (edited)

...a bunch of nonsense but kept for hysterical historical purposes :( 

  Reveal hidden contents

 ... so, yes. Use the solution below :)

Edited by argumentum
oops

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

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