OpusScript Reference List

This OpusScript Reference List is a list of all the OpusScript functions in alphabetical order. When using an OpusScript function in a Script Object or Script Action, you must enter the function name as it appears in this list.

 

Function Name:

Category:

Description:

 

Database

A list of all the Database functions

 

Date

A list of all the Date functions

 

Math

A list of all the Math functions

AddPoint

Frame

Add a point to the current contour in the frame

Back

Browsers

Goes back one page in the browser history

Backward

MultiFrames

Go back one frame

bool

Global String

Convert a value to a Boolean

CallFn

External DLL

Call a function within a DLL.

CaptureMouse

Graphical Objects

Capture the mouse input

ChangeDisplayMode

Global

Change the user’s Display Mode (i.e. screen resolution)

charAt

String

Get the character at the specified position in the string

charCodeAt

String

Get the character code at the specified position in the string

CharFromPoint

Text Objects

Get the character at a given position

ClearBookmark

Pages

Clear a Bookmark for the current page

ClearDraw

Frame

Remove all script drawing elements from the frame

CloneObject

Graphical Objects

Clone an object

Close

File

Close an opened file

Close

Views

Close the view

contains

Global String

Test if one string contains another string

Continue

Clock

Continue a paused clock Object

Continue

Slideshow

Continue a Slideshow

CopyFile

Global

Copy a file to a new location of the user’s machine

CopyToClipboard

Graphical Objects

Copy an object to the Windows clipboard

CopyToClipboard

Pages

Copy the page to the Windows clipboard

CreateCDPlayer

Global

Create a new CD player Object

CreateCDPlayer

Sound

Create a CD player Object

CreateClock

Clock

Creates a new clock Object

CreateHypertext

Text Objects

Create a hypertext link and action for a selection

Debug.trace

Global

Debugging tool that uses the Script Console

Debug.tracePane

Global

Debugging tool that creates a new pane in the Script Console

DeleteFile

Global

Delete a file from the user’s machine

DeleteRegistryValue

Global

Delete a value from the system registry

DestroyClonedObject

Graphical Objects

Destroy a cloned object

DrawEllipse

Frame

Draw an ellipse in the frame

DrawLine

Frame

Draw a line between two points in the frame

DrawRectangle

Frame

Draw a rectangle in the frame

DrawRegPoly

Frame

Draw a regular polygon (eg triangle or octagon) in the frame

DrawRoundRectangle

Frame

Draw a round cornered rectangle in the frame

DrawStar

Frame

Draw a star in the frame

Enable

Graphical Objects

Enable or disable this object

EndOfFile

File

Check for the end of file marker in the specified file

ExitPublication

Global

Exit the publication, via an Exit page (if any)

Fade

Graphical Objects

Fade an object by an amount

FileExists

Global

Test if a file exists in a given location

FindChild

Basic Objects

Finds the child of this object with a particular name

FindDescendent

Basic Objects

Finds the descendent of this object with a particular name

FindText

Text Objects

Find a string of text in a Text object

FindTextInSelection

Text Objects

Find a string of text in a selection

FollowPath

Graphical Objects

Make an object follow an animation path

fork

Global

Allows lines of code to be executed simultaneously

format

Global String

Format a number as a string

Forward

Browsers

Goes forward one page in the browser history

Forward

MultiFrames

Go forward one frame

GetAppearance

Graphical Objects

Get the appearance information for the Object State of a specified object

GetBookmarkPage

Pages

Get Bookmark page by its index number

GetChild

Basic Objects

Gets a child of this object by index

GetClock

Clock

Returns a specified clock Object

GetDisplayData

Graphical Objects

Get display information related to an object e.g. scale and skew

GetFirstBookmark

Pages

Get the first Bookmark page

GetFirstChild

Basic Objects

Gets the first child of this object

GetFirstHypertext

Text Objects

Get the first hypertext link in a specified text object

GetFirstKeyword

Search

Gets first keyword in search list

GetFirstPage

Search

Gets first page to search on

GetFirstView

Views

Get the first view open

GetHeight

Graphical Objects

Get the height of the object

GetHours

Clock

Returns number of hours for a clock Object

GetINIFileData

Global

Return the value of a specified key in a specified section of an INI file

GetINISectionData

Global

Return the contents of a section of an INI file as a string

GetJoystickState

Global

Get the current joystick state

GetLastPage

Global

Get the last page in the publication

GetLastPage

Publications

Get the name of the last page in the publication

GetLayer

Graphical Objects

Get the layer that the object is on

GetLength

Video

Get the length of the video in seconds

GetLineCount

Text Objects

Get the number of lines

GetLocale

Global

Get current user locale (language and country information)

GetMinutes

Clock

Returns number of minutes for a clock Object

GetMousePosition

Pages

Get the x and y coordinates of the current mouse position

GetName

Basic Objects

Gets the name of the object

GetNextBookmark

Pages

Get the next Bookmark page

GetNextChild

Basic Objects

Gets the child of this object that follows another

GetNextHypertext

Text Objects

Get the next hypertext link in a specified text object

GetNextKeyword

Search

Gets next keyword in search list

GetNextPage

Pages

Get the next page in the publication

GetNextPage

Search

Gets next page to search on

GetNextView

Views

Get the next view

GetNumberChildren

Basic Objects

Gets the number of children of this object

GetNumberHypertext

Text Objects

Get the total number of links in a specified text object

GetNumberViews

Views

Get the number of views open

GetObjectDimensions

Graphical Objects

Get the position and size of an object

GetPage

Global

Get a page by name

GetPage

Publications

Get a page by name

GetPage

Views

Get the page currently displayed in the view

GetPageDownloadPercent

Global

Get the percentage complete of the page downloaded

GetPageDownloadPosition

Global

Get the position of the page downloaded

GetPageDownloadTotal

Global

Get the total size of the page downloaded

GetPageNumber

Pages

Return page number of current page open in the publication

GetParagraphCount

Text Objects

Get the number of paragraphs in a Text object

GetParent

Basic Objects

Gets the parent of this object

GetPersistentObject

Graphical Objects

Get an object for storing information that will persist when the page is not visible

GetPosition

Graphical Objects

Get the x and y coordinate of the objects position

GetPosition

Graphical Objects

Get the x and y coordinate of an animation path’s length

GetPosition

Sound

Get the current position in seconds for a sound file

GetPosition

Video

Get the current position of a video in seconds

GetPositionFromPercent

Graphical Objects

Get the x and y coordinate of an animation path from a percent along the path

GetPreviousPage

Pages

Get the previous page in the publication

GetPublication

Pages

Get the name of the current publication

GetScrollInfo

Graphical Objects

Get the scroll position, scroll size and scrollbar

GetSeconds

Clock

Returns number of seconds for a clock Object

GetSelection

Text Objects

Gets the position of the selected characters

GetSelectionParagraphStyle

Text Objects

Get the paragraph style of selected text

GetSelectionStyle

Text Objects

Get the formatting style of selected text

GetSelectionText

Text Objects

Gets the selected text as a string

GetSlide

Slideshow

Get the slide currently visible

GetSlideCount

Slideshow

Count the number of slides in a slideshow

GetState

Buttons

Returns the current state of a push button

GetText

Text Objects

Get the text used for a hyperlink as a string

GetTextLength

Text Objects

Get the number of characters

GetTotalLength

Graphical Objects

Get the total length of an animation path

GetType

Global

Get the object’s Object Type e.g. button, image etc.

GetType

Views

Get the View Type

GetUniqueObjectID

Basic Objects

Gets a string that is unique to this object

GetViewAt

Views

Get the view at a specified index position

GetVolume

Sound

Get the volume level of a specified device

GetVolume

Sound

Get the volume level of a specified sound Object

GetWidth

Graphical Objects

Get the width of the object

GetWordCount

Text Objects

Get the number of words

GetXPosition

Graphical Objects

Get the x coordinate of the objects position

GetYPosition

Graphical Objects

Get the y coordinate of the objects position

Go

Video

Set the first frame of a video

GotoAndPlay - Tween

Graphical Objects

Go to a particular frame of a tween and start playing

GotoAndStop - Tween

Graphical Objects

Go to a particular frame of a tween and stop playing

GotoBackwardPage

Global

Go to the previous page in the publication

GotoBookmark

Pages

Go to a specific Bookmark

GotoCurrentPage

Global

Go to current page in publication

GotoFirstLine

File

Goes to first line of an opened file

GotoForwardPage

Global

Go to the next page in the publication

GotoFrame - Tween

Graphical Objects

Go to a specific frame in a Tween.

GotoNextLine

File

Goes to next line of an opened file

GotoNextPage

Global

Go to the next page in the page history

GotoNextRandomPage

Global

Go to a random page within the chapter without repeating

GotoPage

Global

Go to a given page

GotoPreviousPage

Global

Go to the previous page in the page history

GotoRandomPage

Global

Go to a random page within the chapter

GotoSlide

Slideshow

Go to a specific slide

Hide

Graphical Objects

Hide this object

Home

Browsers

Goes to the Home page of the specified browser Object

indexOf

String

Return the position within the String object of the substring

integer

Global String

Convert a value to an integer

InternetGetData

Global

Gets information from a remote server

InternetPostData

Global

Post information to a remote server

IsAutonarratePlaying

Text

Check if an autonarrate is currently playing

IsEnabled

Graphical Objects

Test if this object is enabled

IsKeyPressed

Global

Test if a specific key is being pressed

IsMousePressed

Global

Test if a specified special key is being pressed

IsObjectIntersecting

Graphical Objects

Test if this object is intersecting another

IsPlaying

Slideshow

Check if a specified Slideshow is playing

IsPlaying

Video

Check if a specified video is playing

IsShowing

Graphical Objects

Test if this object is showing

lastIndexOf

String

Return the position within the String object of the last match in the substring

LaunchFile

Global

Open an external file

LaunchSearch

Global

Open the Search dialog box

LaunchURL

Global

Open a URL

left

Global String

Get the left end of a string

length

Global String

Get the length of a string

length

String

The length of the string

LineFromChar

Text Objects

Get the line index of a character position

LineIndex

Text Objects

Get the character index of the first character in a line

LineLength

Text Objects

Get the number of characters in a line

LoadDLL

External DLL

Load a DLL so functions from it can be accessed.

MAX_VALUE

Number

The largest number that can be represented in OpusScript

mid

Global String

Get part of the middle of a string

MIN_VALUE

Number

The smallest number that can be represented in OpusScript

Move

Graphical Objects

Move the object by its x and y coordinates

MoveX

Graphical Objects

Move the object by its x coordinate

MoveY

Graphical Objects

Move the object by its y coordinate

NaN

Number

Returns a value that is "not a number"

Navigate

Browsers

Open a specified URL in specified browser Object

NEGATIVE_INFINITY

Number

A value representing negative infinity

number

Global String

Convert a value to a number

OpenFile

File

Opens a file and returns a new file Object

OpenSearch

Global

Returns a search object containing the publication search words

OpenSound

Sound

Open a sound file but don’t play it

ParagraphIndex

Text Objects

Returns the index number of the paragraph in a Text object

ParagraphLength

Text Objects

Returns the number of characters in a paragraph

Pause

Clock

Pause a clock Object

Pause

Slideshow

Pause a Slideshow

Play -Slideshow

Slideshow

Play a Slideshow

Play-Sound

Sound

Play a sound file

Play-Video

Video

Play a specified video

Play - Tween

Tween

Play a Tween Animation

PlayAutonarrate

Text Objects

Begin the autonarration on this text

PlayCDTrack

Global

Play a track from a CD

PlaySound

Sound

Play a sound file

PlaySystemSound

Global

Play a system sound from the users computer

PointFromChar

Text Objects

Get the position of a character

POSITIVE_INFINITY

Number

A value representing positive infinity

Print

Browsers

Print the contents of a Browser object

PrintFile

Global

Print the specified file

PrintObject

Global

Print the specified Object

PrintPage

Global

Print the specified page or page Object

Pause - Sound

Sound Objects

Pauses a WAV file

random

Global String

Get a random integer

Read

File

Read a file that has been opened

ReadField

File

Reads a field in a file that has been opened

ReadLine

File

Reads first line of an opened file

ReadRegistryKey

Global

Return the value of a specified key in the Registry

ReallyExitPublication

Global

Exit the publication immediately

Refresh

Browsers

Redisplays the current page in the specified browser Object

RegisterEventHandler

Event Objects

Set a function to be called when a certain event triggers on the object.

ReleaseMouse

Graphical Objects

Release the mouse input

RemoveAllHypertext

Text Objects

Remove all hypertext links for this text

RemoveAlpha

Graphical Objects

Remove Alpha effect from specified object

RemoveBackground

Graphical Objects

Remove Background style from specified object

RemoveBlur

Graphical Objects

Remove Blur from specified object

RemoveBorder

Graphical Objects

Remove Border style from specified object

RemoveBtnColour

Graphical Objects

Remove Button style from specified object

RemoveFlare

Graphical Objects

Remove Flare effect from specified object

RemoveImage

Graphical Objects

Remove Image file from specified object

RemovePoint

Frame

Remove a point from the contour in the frame

RemoveShadow

Graphical Objects

Remove Shadow effect from specified object

RemoveTexture

Graphical Objects

Remove Texture effect from specified object

ReplaceSelection

Text Objects

Replaces the current selection with a specified string

ReportClose

Global

Close the open log file

ReportGetFilename

Global

Get the filename of the current log file

ReportSetFilename

Global

Set the output file for logging actions

ReportWriteString

Global

Write a string to the current log file

ResetAnimation

Graphical Objects

Reset an animation

ResetVariables

Publications

Reset all the publications variables to their default

ResetVars

Pages

Reset all page properties variables

Resume Sound

Sound Objects

Resumes a WAV sound previously paused

RGB

Global

Return a number indicating a RGB colour value

right

Global String

Get the right end of a string

Roll

Graphical Objects

Roll an object by a specified angle

Rotate

Graphical Objects

Rotate an object by a specified angle

Scale

Graphical Objects

Scale an object horizontally and vertically by a percentage

ScaleH

Graphical Objects

Scale an object horizontally by a percentage

ScaleV

Graphical Objects

Scale an object vertically by a percentage

Scroll

Text Objects

Scroll the text by line, paragraph or page

Seek

Sound

Reposition the starting point of a sound

Seek

Video

Reposition the starting point of a video

SendEmail

Global

Send an email

SetAlpha

Graphical Objects

Set Alpha effect on a specified object

SetBackground

Graphical Objects

Set Background style on a specified object

SetBlur

Graphical Objects

Set Blur on a specified object

SetBookmark

Pages

Bookmark the current page

SetBorder

Graphical Objects

Set Border style on a specified object

SetBtnColour

Graphical Objects

Set Button style on a specified object

SetColour

Text Objects

Set the colour of text in a Text object

SetDisplayData

Graphical Objects

Set display information related to an object e.g.

SetFillColour

Polygons

Set the fill colour of a polygon in a Vector object

SetFillColour

Frame

Set the fill colour for the script drawing in the frame

SetFlare

Graphical Objects

Set Flare effect on a specified object

SetFocus

Graphical Objects

Set the keyboard input focus

SetImage

Graphical Objects

Set Image file on a specified object

SetINIFileData

Global

Set the value of a specified key in a specified section of an INI file

SetInitialPositionExact

Chapter

Set the initial position a chapter window will open at, using an absolute position

SetInitialPositionPercent

Chapter

Set the initial position a chapter window will open at, as a percentage of the screen size

SetLayer

Graphical Objects

Set the layer that the object is on

SetLineColour

Polygons

Set the line colour of a polygon in a Vector object

SetLineColour

Frame

Set the line colour for the script drawing in the frame

SetLineStyle

Frame

Set the line style for the script drawing in the frame

SetListBoxSelection

Text Objects

Set the highlighted area in a Listbox object to a new line

SetObjectDimensions

Graphical Objects

Set the position and size of an object

SetPosition

Graphical Objects

Set aspects of the objects position

SetPosition

Sound

Set the current position in seconds for a sound file

SetPositionX

Graphical Objects

Set the x coordinate of the objects position

SetPositionY

Graphical Objects

Set the y coordinate of the objects position

SetRoll

Graphical Objects

Set an objects roll to a specified angle

SetRotation

Graphical Objects

Set an objects rotation to a specified angle

SetScale

Graphical Objects

Set the horizontal and vertical scale of an object to a percentage

SetScaleH

Graphical Objects

Set the horizontal scale of an object to a percentage

SetScaleV

Graphical Objects

Set the vertical scale of an object to a percentage

SetScrollPosition

Graphical Objects

Set the scroll position of the object

SetSelection

Text Objects

Selects a range of characters in the text object

SetSelectionParagraphStyle

Text Objects

Set the paragraph style of selected text

SetSelectionStyle

Text Objects

Set the formatting style of selected text

SetShadow

Graphical Objects

Set Shadow effect on a specified object

SetSkew

Graphical Objects

Skew an object horizontally and vertically to a specified angle

SetSkewH

Graphical Objects

Skew an object horizontally to a specified angle

SetSkewV

Graphical Objects

Skew an object vertically to a specified angle

SetSpin

Graphical Objects

Set an objects spin to a specified angle

SetState

Buttons

Sets the current state of a push button

SetTexture

Graphical Objects

Set Texture effect on a specified object

SetTransparency

Graphical Objects

Set the objects transparency

SetVolume

Sound

Set the volume level for a specified device

SetVolume

Sound

Set the volume level for a specified sound Object

Show

Graphical Objects

Show this object

ShowBookmarkDialog

Pages

Show the Bookmark Dialog box

Spin

Graphical Objects

Spin an object by a specified angle

split

String

Split a String object into an array of strings

Start

Clock

Start a clock Object

Start

Timelines

Start a specified Timeline

Stop - Browser

Browsers

Stops the specified browser Object

Stop - Clock

Clock

Stop a clock Object

Stop - Slideshow

Slideshow

Stop a Slideshow

Stop - Sound

Sound

Stop a sound file

Stop - Timeline

Timelines

Stop a specified Timeline

Stop - Tween

Tweens

Stops the specified Tween Animation

Stop - Video

Video

Stop a specified video

StopAnimation

Graphical Objects

Stop an animation

StopAutonarrate

Text Objects

End the autonarration on this text

string

Global String

Convert a value to a string

substring

String

Returns a substring of a specified string

TimeGetSeconds

Publications

Get the number of seconds a publication has been running

ToEnd

MultiFrames

Go to last frame in the MultiFrame

ToFrame

MultiFrames

Go to a given frame in the MultiFrame

tolower

Global String

Get a lower case version of a string

toLowerCase

String

Converts the String object to lower case

ToStart

MultiFrames

Go to first frame in the MultiFrame

toString

Boolean

Converts a Boolean object to a string

toString

File

Returns the type of object as a string

toString

Number

Converts the Number object into a string

toString

String

Converts the String object into a string

toupper

Global String

Get an upper case version of a string

toUpperCase

String

Converts the String object to upper case

TriggerComponentEvent

Event Objects

Activate a Custom Trigger for a specified object.

UnRegisterEventHandler

Event Objects

Remove a previously registered event handler.

valueOf

Boolean

Returns a primitive value of a Boolean Object

valueOf

Number

Returns the primitive value of the Number Object

valueOf

String

Returns the primitive value of the String object

word

Global String

Get a word from a string

Write

File

Write a string to an opened file

WriteField

File

Write a string to a field in an opened file

WriteLine

File

Write a string to a line in an opened file

WriteRegistryValue

Global

Write a value to the system registry