Servei ScriptForge.Platform

Contingut
Índex 🔎︎

# 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 LibreOffice version

- The current user name

All properties of the Platform service are read-only.

## Invocació del servei

The code snippet below instantiates the Platform service and accesses the Architecture property.

            GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")
            Dim platform As Variant
            platform = CreateScriptService("Platform")
            MsgBox platform.Architecture

This service is fully supported in both Basic and Python languages. All examples are expressed using the Basic programming language and can be easily converted to Python.

## Propietats

Nom | Només de lectura | Tipus | Descripció
Architecture | Sí | String | The hardware bit architecture. Example: '32bit' or '64bit'
ComputerName | Sí | String | El nom que l'ordinador utilitza a les xarxes.
CPUCount | Sí | Integer | The number of central processing units.
CurrentUser | Sí | String | The name of the currently logged user.
Machine | Sí | String | The machine type. Examples are: 'i386' or 'x86_64'.
OfficeVersion | Sí | String | The actual LibreOffice version expressed as ' LibreOffice w.x.y.z (The Document Foundation)'. Example: 'LibreOffice 7.1.1.2 (The Document Foundation, Debian and Ubuntu)'
OSName | Sí | String | The operating system type. Example: 'Darwin, Linux' or 'Windows'.
OSPlatform | Sí | String | A 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'
OSRelease | Sí | String | The operating system's release. Example: '5.8.0-44-generic'
OSVersion | Sí | String | The operating system's build or version. Example: '#50-Ubuntu SMP Tue Feb 9 06:29:41 UTC 2021'
Processor | Sí | String | The real processor name. Example: 'amdk6'. This property may return the same value as the Machine property.

Totes les rutines o identificadors Basic de l'ScriptForge que comencen per un guió baix «_» són únicament per a ús intern. No han d'utilitzar-se en macros Basic.

Temes relacionats

Identifying the operating system

Platform information with INFO("system") Calc formula

GetGuiType function

Biblioteca Tools