Found in utils kplugins v0.7 by mark307
# Get OS Version
# Gets os version by GetVersionEx Win32API
# Field is "Major", "Minor", "Build", "Platform", "CSD", or "".
# These are associated with dwMajorVersion, dwMinorVersion,
# dwBuildNumber, dwPlatformId, szCSDVersion, or all.
$value = pluginmsgex(utils, "GetOSVer", $field);
# useful idiom: 9X or NT
$os = pluginmsgex(utils, "GetOSVer", "Platform") == 2 ? "NT" : "9X";
I must add that to fix the real OS, it must be used another test (for Linux users), as in this sample:
cfg_ProfileDir{
macroinfo=_("Open the profile directory");
$_windows=readfile("Z:\\etc\\group");
$_windows=""?$explorer="explorer \"":$explorer=getpref(STRING,"general.explorer")." ";
$_folder=getfolder(ProfileFolder);
$_windows=""?$_folder=$_folder."\"":&cfg_MakeTuxPath;
exec($explorer.$_folder);
}
A+
Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0
Web:
http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr
Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc
Edited 2 time(s). Last edit at 07/19/2009 08:57AM by JujuLand.