Modify

Opened 9 months ago

Last modified 2 months ago

#3966 new Feature Request

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 (5)

comment:1 Changed 9 months ago by TicketCleanup

  • Version 3.3.14.0 deleted

Automatic ticket cleanup.

comment:2 follow-up: Changed 9 months ago by Jos

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

comment:3 follow-up: Changed 9 months ago by Andreik

Why @OSBuild is not enough?

comment:4 in reply to: ↑ 2 Changed 2 months ago by anonymous

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.

comment:5 in reply to: ↑ 3 Changed 2 months ago by anonymous

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.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as new The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.