ScriptForge.Platform service/text/sbasic/shared/03/sf_platform.xhpPlatform service
ScriptForge.Platform service
The Platform service provides a collection of properties about the current execution environment and context, such as:The hardware platform (architecture, CPU count, machine type, etc)Operating system information (OS type, release, version, etc)The %PRODUCTNAME versionThe current user nameAll properties of the Platform service are read-only.
Service invocation
The code snippet below instantiates the Platform service and accesses the Architecture property.GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")Dim platform As Variantplatform = CreateScriptService("Platform")MsgBox platform.ArchitecturePlatform service;ArchitecturePlatform service;ComputerNamePlatform service;CPUCountPlatform service;CurrentUserPlatform service;MachinePlatform service;OfficeVersionPlatform service;OSNamePlatform service;OSPlatformPlatform service;OSReleasePlatform service;OSVersionPlatform service;Processor
Properties
NameReadonlyTypeDescriptionArchitectureYesStringThe hardware bit architecture. Example: '32bit' or '64bit'ComputerNameYesStringThe computer's network name.CPUCountYesIntegerThe number of central processing units.CurrentUserYesStringThe name of the currently logged user.MachineYesStringThe machine type. Examples are: 'i386' or 'x86_64'.OfficeVersionYesStringThe actual %PRODUCTNAME version expressed as ' %PRODUCTNAME w.x.y.z (The Document Foundation)'.Example: 'LibreOffice 7.1.1.2 (The Document Foundation, Debian and Ubuntu)'OSNameYesStringThe operating system type. Example: 'Darwin, Linux' or 'Windows'.OSPlatformYesStringA single string identifying the underlying platform with as much useful and human-readable information as possible.Example: 'Linux-5.8.0-44-generic-x86_64-with-glibc2.32'OSReleaseYesStringThe operating system's release. Example: '5.8.0-44-generic'OSVersionYesStringThe operating system's build or version.Example: '#50-Ubuntu SMP Tue Feb 9 06:29:41 UTC 2021'ProcessorYesStringThe real processor name. Example: 'amdk6'.This property may return the same value as the Machine property.
Identifying the operating systemPlatform information with INFO("system") Calc formulaGetGuiType functionTools library