ScriptForge.Platform zerbitzua

Platform zerbitzuak uneko exekuzio-inguruneari eta -testuinguruneari buruzko propietateen bilduma bat eskaintzen du, adibidez:

note

Platform zerbitzuaren propietate guztiak soilik irakurtzeko dira.


Zerbitzuari deitzea

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

Basic lengoaian

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

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

Propietateak

Izena

Irakurtzeko soilik

Mota

Deskribapena

Architecture

Bai

String

Hardwarearen bit-arkitektura. Adibidez: '32bit' edo '64bit'

ComputerName

Bai

String

Ordenagailuaren izena sarean.

CPUCount

Bai

Integer

Prozesatzeko unitate zentralen (PUZ) kopurua.

CurrentUser

Bai

String

Unean saioa hasita duen erabiltzailearen izena.

Fonts

Bai

String motako matrizea

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

Locale

Bai

String

Returns the operating system locale as a string in the format language-COUNTRY (la-CO).

Examples: "en-US", "pt-BR", "fr-BE".

Machine

Bai

String

Makina mota. Adibideak: 'i386' edo 'x86_64'.

OfficeVersion

Bai

String

Uneko LibreOffice bertsioa, honal adierazita:
' LibreOffice w.x.y.z (The Document Foundation)'.

Adibidea: 'LibreOffice 7.1.1.2 (The Document Foundation, Debian and Ubuntu)'

OSName

Bai

String

Sistema eragilearen mota. Adibideak: 'Darwin, Linux' edo'Windows'.

OSPlatform

Bai

String

Kate bakar bat plataforma ahalik eta gehien identifikatzeko, gizakiak irakurtzeko moduko informazio ahalik eta erabilgarrienarekin.

Adibidea: 'Linux-5.8.0-44-generic-x86_64-with-glibc2.32'

OSRelease

Bai

String

Sistema eragilearen argitalpena. Adibidea: '5.8.0-44-generic'

OSVersion

Bai

String

Sistema eragilearen eraikuntza edo bertsioa.

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

Printers

Bai

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

Bai

String

Prozesatzaileaaren benetako izena. Adibidea: 'amdk6'.

Propietate honek eta Machine propietatek balio bera eman dezakete.

PythonVersion

Bai

String

Returns the version of the Python interpreter being used as a string in the format "Python major.minor.patchlevel" (ex: "Python 3.9.7").


Adibidea:

The following examples in Basic and Python illustrate how to use the Fonts property to write the names of all available fonts to the current Calc sheet starting at cell "A1":

Basic lengoaian

      Dim oDoc as Object
      Dim allFonts as Object
      Dim svcPlatform as Object
      Set oDoc = CreateScriptService("Calc")
      Set svcPlatform = CreateScriptService("Platform")
      allFonts = svcPlatform.Fonts
      oDoc.setArray("~.A1", allFonts)
    
Python lengoaian

      from scriptforge import CreateScriptService
      svc_platform = CreateScriptService("Platform")
      doc = CreateScriptService("Calc")
      all_fonts = svc_platform.Fonts
      doc.setArray("~.A1", all_fonts)
    
warning

Azpimarraren karaktere bat, "_", aurrizki gisa duten ScriptForge Basic errutina edo identifikatzaile guztiak barneko erabilerarako erreserbatuta daude. Ez dira Basic makroetan edo Python scriptetan erabili behar.