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

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
    
note

Ce service est complĂštement pris en charge par les langages Basic et Python. Tous les exemples sont exprimĂ©s en utilisant le langage de programmation Basic et peuvent facilement ĂȘtre convertis en Python.


Properties

Name

Readonly

Type

Description

Architecture

Yes

String

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

ComputerName

Yes

String

The computer's network name.

CPUCount

Yes

Integer

The number of central processing units.

CurrentUser

Yes

String

The name of the currently logged user.

Machine

Yes

String

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

OfficeVersion

Yes

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

Yes

String

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

OSPlatform

Yes

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

Yes

String

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

OSVersion

Yes

String

The operating system's build or version.

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

Processor

Yes

String

The real processor name. Example: 'amdk6'.

This property may return the same value as the Machine property.


warning

Toutes les routines ou identificateurs Basic ScriptForge prĂ©cĂ©dĂ©s d'un trait de soulignement "_" sont rĂ©servĂ©s Ă  un usage interne. Ils ne sont pas destinĂ©s Ă  ĂȘtre utilisĂ©s dans les macros Basic.


Aidez-nous !