ScriptForge.Platform service

The Platform service provides a collection of properties about the current execution environment and context, such as:

note

All properties of the Platform service are read-only.


Service invocation

Before using the Platform service the ScriptForge library needs to be loaded or imported:

note

• Basic macros require to load ScriptForge library using the following statement:
GlobalScope.BasicLibraries.loadLibrary("ScriptForge")

• Python scripts require an import from scriptforge module:
from scriptforge import CreateScriptService


The examples below in Basic and Python instantiate the Platform service and access the Architecture property.

In Basic

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

      from scriptforge import CreateScriptService
      svc = CreateScriptService("Platform")
      bas = CreateScriptService("Basic")
      bas.MsgBox(svc.Architecture)
    

Ominaisuudet

Nimi

Kirjoituslukittu

Tyyppi

Kuvaus

Architecture

Kyllä

String

The hardware bit architecture. Example: '32bit' or '64bit'

ComputerName

Kyllä

String

The computer's network name.

CPUCount

Kyllä

Integer

The number of central processing units.

CurrentUser

Kyllä

String

The name of the currently logged user.

Extensions

Kyllä

String array

Returns a zero-based array of strings containing the internal IDs of all installed extensions.

FilterNames

Kyllä

String array

Returns a zero-based unsorted array of strings containing the available document import and export filter names.

Fonts

Kyllä

String array

Returns a zero-based array of strings containing the names of all available fonts.

FormatLocale

Kyllä

String

Returns the locale used for numbers and dates as a string in the format "la-CO" (language-COUNTRY).

Locale

Kyllä

String

Returns the locale of the operating system as a string in the format "la-CO" (language-COUNTRY). This is equivalent to the SystemLocale property.

Machine

Kyllä

String

The machine type. Examples are: 'i386' or 'x86_64'.

OfficeLocale

Kyllä

String

Returns the locale of the user interface as a string in the format "la-CO" (language-COUNTRY).

OfficeVersion

Kyllä

String

The actual LibreOffice version expressed as
' LibreOffice w.x.y.z (The Document Foundation)'.

Example: 'LibreOffice 7.4.1.2 (The Document Foundation, Debian and Ubuntu)'

OSName

Kyllä

String

The operating system type. Example: 'Darwin, Linux' or 'Windows'.

OSPlatform

Kyllä

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

Kyllä

String

The operating system's release. Example: '5.8.0-44-generic'

OSVersion

Kyllä

String

The operating system's build or version.

Example: '#50-Ubuntu SMP Tue Feb 9 06:29:41 UTC 2021'

Printers

Kyllä

String
array

The list of available printers as a zero-based array.

The default printer is put in the first position of the list (index = 0).

Processor

Kyllä

String

The real processor name. Example: 'amdk6'.

<