Project

General

Profile

Actions

Feature #3985

closed

Change $OS to return only windows version

Added by westor (GR) over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Scripting
Target version:
Start date:
07/06/2018
Due date:
% Done:

0%

Estimated time:
Operative System:
All

Description

Hello,

I wanna suggest a change related to $os identifier because it will break some existings codes of mIRC's $os identifier that returns only the windows version, i know that $osmajor does this already but you need to specify if using AdiIRC to call $osmajor instead of $os, also there is already AdiIRC's $osversion identifier that is equal with $os so why not changing $os to return just 7/8/8.1/10 as mIRC's one?

That suggestion i make is because there is already $osversion included that is doing the same work with currently $os that doesn't really need to have two same results identifiers otherwise i wouldn't.

Examples:

That code will only work in mIRC but if you try to use it on AdiIRC it will not, and you need to add an extra code to check if using adiirc.

ON *:LOAD: {
  if ($os !== 10) { echo 4 -a Error, You need windows 10 to work that code. | .unload -rs $qt($script) }
  else { echo 3 -a Install succeed. }
}

ON *:LOAD: {
  var %os = $iif($~osmajor,$v1,$os)
  if (%os !== 10) { echo 4 -a Error, You need windows 10 to work that code. | .unload -rs $qt($script) }
  else { echo 3 -a Install succeed. }
}

- Thanks!

Actions

Also available in: Atom PDF