ScriptForge Libraries /text/sbasic/shared/03/lib_ScriptForge.xhp

The ScriptForge Library

BASIC ScriptForge library Python scriptforge module
ScriptForge libraries build up an extensible collection of macro scripting resources for %PRODUCTNAME to be invoked from Basic macros or Python scripts.
• 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
To learn more about how to create and execute Python scripts using the ScriptForge library, read the help page Creating Python Scripts with ScriptForge.

Invoking ScriptForge services

The described modules and classes are invoked from user scripts as "Services". A generic constructor of those services has been designed for that purpose for each language. The Dispose method is available in all services and should be called to free up resources after usage: GlobalScope.BasicLibraries.LoadLibrary("ScriptForge") Set oSvc = CreateScriptService("servicename"[, arg0, arg1, ...]) ' ... oSvc.Dispose() from scriptforge import CreateScriptService svc = CreateScriptService('servicename'[, arg0, arg1, ...]) # ... svc.Dispose()

Services provided by the ScriptForge library

Category Services %PRODUCTNAME Basic Array
Dictionary
Exception
FileSystem
String
TextStream
Document Content Base
Calc
Chart
Database
Document
Writer
User Interface Dialog
DialogControl
Form
FormControl
Menu

PopupMenu
UI

Utilities Basic
L10N
Platform
Region
Services
Session
Timer
UnitTest

Restricted use for SF_Root, SF_Utils modules as well as internal methods Note: Other ScriptForge undescribed modules are reserved for internal use. Their content is subject to change without notice.
All ScriptForge Basic routines or identifiers that are prefixed with an underscore character "_" are reserved for internal use. They are not meant be used in Basic macros or Python scripts.