PixelPixPanreyes Posted November 30, 2023 Posted November 30, 2023 Sorry for this bad idea, but it would be really useful for me to have a pragma option for that 😅 Since the release of Windows 11, I have written a lot of AutoIT scripts that use @OSVersion == "WIN_10", and I use a $OSVersion to actually confirm that the current OS is Windows 11. Would it be possible adding a pragma option that would let us identify Windows 11 as @OSVersion = "WIN_10"?
Solution Danp2 Posted November 30, 2023 Solution Posted November 30, 2023 I doubt that your request will be granted. However, you could simply replace the use of @OSVersion with your own function that behaves in your desired manner. Latest Webdriver UDF Release Webdriver Wiki FAQs
Developers Jos Posted November 30, 2023 Developers Posted November 30, 2023 (edited) On 11/30/2023 at 12:56 PM, PixelPixPanreyes said: Would it be possible adding a pragma option that would let us identify Windows 11 as @OSVersion = "WIN_10"? Expand Nah ... your reason for asking is because your script logic is wrong and I honestly don't see how this saves you any times as ALL scripts would have to be recompiled anyway. Simply do a replace of the @OSVersion = "WIN_10" in your scripts for a test that tests the Build number: @OSBuild >= xxxxx (xxxx is the win10 build you like to support.) Edited November 30, 2023 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
PixelPixPanreyes Posted November 30, 2023 Author Posted November 30, 2023 You're both absolutely right. I should fix my code properly, but until then the quickest solution is to replace @OSVersion with $MyOSVersion instead of crapping the AutoIT 😅 Thanks! 🙌
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