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

Spoiler

winrt-mediaplayer.png

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, 🔗 AutoIt Cheat Sheet

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)

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.

57 minutes ago, 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.

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:

Spoiler

In the nearly past we (as community) tried to enhance AutoIt GUIs by several things (WebViews, WinRT, embedding web code and others). It's nice to have possibilites and showcases of how such things can be achieved, but for me AutoIt isn't the right approach for such problems/challenges. But this is of course just me. For private projects it's nice and I do often tryouts for such scenarios, but in my profession I (hopefully) choose the right tooling/framework for the goal/problem/challange.

Personally I really would love to see AutoIt enhancing by cross platform functionality and some other features or beeing open source, but this will not happen. So more and more people will leave AutoIt behind in the future.

Anyway, just few thoughts.

Again: Thanks for the showcase and the effort @MattyD 👌 .

Best regards
Sven

==> AutoIt related: 🔗 GitHub, 🔗 Discord Server, 🔗 AutoIt Cheat Sheet

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)

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
1 hour ago, MattyD said:

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

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

... ...
                    If StringInStr($INP_Res_Compatibility, "Win10") Then
                        FileWriteLine($hTempFile2, '            <maxversiontested Id="10.0.18362.1" />') ; insert here
                        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 :) 

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