Show / Hide Table of Contents
  • BC HTML Api reference
    • html-api
      • AnnotationArrowOrientation
      • AnnotationTextAlignment
      • AnnotationTextFontFamily
      • BarcodeOrientation
      • BarcodeThresholdMode
      • BarcodeType
      • BatchEnums
        • Mode
        • Queue
      • CallContext
      • DbClient
      • DbServer
      • FileMimeType
      • FileType
      • IAnnotation
      • IAnnotationProperties
      • IApplication
      • IBarcodeData
      • IBaseControl
      • IBatch
      • IBatchClass
      • IButton
      • ICheckBox
      • IComboBox
      • ICustomThemeConfig
      • IDocument
      • IDocumentClass
      • IField
      • IFieldValidation
      • IFileInfo
      • IFolder
      • IFolderClass
      • IFormType
      • IGroup
      • IIndexClass
      • IITModule
      • IJob
      • ILabel
      • ILicenseGroup
      • IListItem
      • IListView
      • ImageColorMode
      • ImageOperationType
      • INode
      • INodeComment
      • INodeReviewComment
      • INuanceEngineConfig
      • IOCRConfiguration
      • IPage
        • Side
      • IRadioButton
      • IRecognitionProfile
      • IRectangle
      • IRegexValidation
      • IScanProfile
      • ITable
      • ITabView
      • ITextBox
      • IthConfig
      • ITitledPanel
      • IUser
      • LevelName
      • NodeReviewStatus
      • NuanceEngine
      • NuanceLanguage
      • NuanceMode
      • PageSideMode
      • RecognitionEngine
      • RpcService
      • ScanService
      • ScanSource
      • ScriptActionType
      • ScriptResultConsts
      • ScriptResultProp
      • UnloadReason

Interface IApplication

This object provides access from script methods to the application. All scripts (the global script, the Job level script and the Index Class level script) have a global variable defined with name Application which is an object of this type.

Methods list

dialog(content, title, closable) getCurrentLanguageTag() getCurrentScanProfile() getScanners(serviceType) performContextAction(actionType, properties, targetNode, selection)
Remarks

alias Application

Methods

dialog(content, title, closable)

Creates a modal Dialog with the given custom content.

context
Not available.
context
Not available.
Declaration
dialog(content: HTMLElement, title: string, closable: boolean): IDialog;
Parameters
Type Name Description
HTMLElement content
string title
boolean closable
Returns
Type Description
IDialog

getCurrentLanguageTag()

This method returns the IETF BCP 47 tag of the language that is currently being used.

IETF BCP 47 tag of the currently selected language

context
Not available.
Declaration
getCurrentLanguageTag(): string;
Returns
Type Description
string

getCurrentScanProfile()

Retrieves the currently selected scan profile.

context
Not available.
context
Not available.
Declaration
getCurrentScanProfile(): IScanProfile | undefined;
Returns
Type Description
IScanProfile | undefined

IScanProfile the current scan profile if any selected or undefined if none is selected

getScanners(serviceType)

Provides a list of the scanners available to the running workstation. Note that an available scanner might be disconnected and not available for use. The name of the scanner matches the name that is shown to Scanner related dialogs.

context
Not available.
context
Not available.
Declaration
getScanners(serviceType: ScanService): Promise<IScanner[]>;
Parameters
Type Name Description
ScanService serviceType
Returns
Type Description
Promise<IScanner[]>

performContextAction(actionType, properties, targetNode, selection)

This method can be used to invoke programmatically several actions in the application.

You should not use this method when you know that other actions are pending. For example, when an existing Batch is closed because the user pressed the New Batch button, then a action is followed by a action. In that case, when you receive the batchUnloaded event, you should avoid using this method because your Action will be performed after the action.

In general, the implementer must provide the Action type and a list of INode upon which the Action will be performed. Different Actions may impose different restrictions on the selectedNodes list. For example, some Actions may require that all INode are Pages. If the requirements are not met, the Action will not be performed.

Some Actions may require additional properties in order to be performed. These are passed as a Map with the actionProperties argument. For example, Action requires a "rotation_angle" property.

Some Actions may require an "action node" to be defined. This is passed with the actionNode argument. A possible example is a Paste Action which needs a list of selectedNodes to be copied and an actionNode where the Nodes will be copied into.

All actions are defined by . However, there are certain actions that cannot be invoked programmatically.

Please, check the documentation of for more details on how each Action works and what the corresponding arguments in this function should be.

Declaration
performContextAction(actionType: string, properties: any, targetNode: INode, selection: INode[]): any;
Parameters
Type Name Description
string actionType
any properties
INode targetNode
INode[] selection
Returns
Type Description
any
Back to top Generated by DocFX