Modify

#3966 closed Feature Request (Rejected)

Macro @WinLevel

Reported by: Alecsis1 Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:

Description

Hi!
In addition to @OSVersion, let's call it for example @WinLevel
What's the difference. @OSVersion returns _string_ value like 'WIN_XP', 'WIN_10' and so on. In some cases this is rather not convenient.
I'd like to suggest a macro returning _integer_ result to simplify native numeric comparison of OS versions.
For example:

@WIN_XP     ->  @WinLevel = 0x0501
@WIN_2003   ->  @WinLevel = 0x0502
@WIN_Vista  ->  @WinLevel = 0x0600
@WIN_7      ->  @WinLevel = 0x0601
@WIN_8      ->  @WinLevel = 0x0602
@WIN_81     ->  @WinLevel = 0x0603
@WIN_10     ->  @WinLevel = 0x0A00

… and so on; in addition the codes above correlate with results returned by WinAPI

The similar codes may be used for server editions especially if there's no difference either it's server or it's ordinary PC
Thank you for attention!
PS1 May be better @OSLevel instead of @WinLevel?…
PS2 As usual sorry for my weak English

Attachments (0)

Change History (6)

comment:1 by TicketCleanup, on Jul 31, 2023 at 5:00:01 PM

Version: 3.3.14.0

Automatic ticket cleanup.

comment:2 by Jos, on Jul 31, 2023 at 7:44:12 PM

Why not simply make a UDF which returns the OS version?

comment:3 by Andreik, on Aug 1, 2023 at 5:55:40 PM

Why @OSBuild is not enough?

in reply to:  2 comment:4 by anonymous, on Feb 20, 2024 at 1:44:45 PM

Replying to Jos:

Why not simply make a UDF which returns the OS version?

I've already written such UDF for myself many years ago. But it is a crappy crutch, not a decision.

in reply to:  3 comment:5 by anonymous, on Feb 20, 2024 at 1:51:30 PM

Replying to Andreik:

Why @OSBuild is not enough?

@OSBuild is a little bit another thing which is good not instead of but in addition to @WinLevel.

comment:6 by Jpm, on Dec 23, 2025 at 10:20:15 PM

Resolution: Rejected
Status: newclosed

It was perhaps a good idea but it is not working for Win_11

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.