Copyright: Copyright (C) 1996 Lotus Development Corporation, an IBM subsidiary


Freelance Graphics: Activate method

 See list of classes

Simulate a click action on a document, a "Click here..." block,  or an OLE object. (Activate for an OLE object is only available in Freelance Graphics 97.) The object becomes the current object and is brought to the foreground.

Syntax

DocumentObject.Activate

or

PlacementBlockObject.Activate

or

OLEObject.Activate

Parameters

None

Return values

None

Usage

When used on an instance of the Document class, the Activate method brings the document to the front. When used on an instance of the PlacementBlock class, the Activate method simulates a click on a "Click here..." block. When used on an instance of the OLEObject class, the Activate method launches the server associated with the embedded object.

Examples

CurrentApplication.Documents(2).Activate

or

[TextPlacementBlock1].Activate

or

Set MyOLE = CurrentPage.CreateObject "PaintBrush Picture"
MyOLE.Activate


Freelance Graphics: AddPoint method

 See list of classes

Add a point to the object.

Syntax

drawobject.AddPoint(segment, x, y)

Parameters

segment as Integer

Identifies the point after which you want to add the new point. (The first drawn point is 1.) If the object in question is not a polygon, line, arrow, or curve, this value is ignored.

x as Integer

Horizontal coordinate of the point relative to the left edge of the window, in twips.

y as Integer

Vertical coordinate of the point relative to the bottom of the window, in twips.

Return values

None


Freelance Graphics: AddToPageSelection method

 See list of classes

Add a page to the set of selected pages in the document.

Syntax

documentobject.AddToPageSelection(pageobject)

Parameters

pageobject as Page

Any page object.

Return values

None

Examples

CurrentDocument.AddToPageSelection MyPage


Freelance Graphics: AddToSelection method

 See list of classes

Add the specified object to the set of selected documents, pages, or objects.

Syntax

object.AddToSelection(drawobject)

Parameters

drawobject as DrawObject

Any DrawObject object.

Return values

None

Examples

CurrentPage.Selection.AddToSelection MyRect

or

Selection.AddToSelection MyRect


Freelance Graphics: Align method

 See list of classes

Align the currently selected objects.

Syntax

selectionobject.Align(aligntype, centeronpage)

Parameters

aligntype as Variant (Enumerated)

Value	Description
$AlignLeft	Align left sides
$AlignRight	Align right sides
$AlignTop	Align tops
$AlignBottom	Align bottoms
$AlignRow	Center in a row
$AlignColumn	Center in a column
$AlignPoint	Center on a point
centeronpage as Integer (Boolean)

Value	Description
TRUE (-1)	Center on page
FALSE (0)	Do not center on page
Return values

None

Examples

Selection.Align $AlignLeft, False


Freelance Graphics: ApplyStyle method

 See list of classes

Apply the specified style name to the text block.

Syntax

textblockobject.ApplyStyle(stylename)

Parameters

stylename as String

Name to apply to the style.

Return values

None


Freelance Graphics: BrowseDiagrams method

 See list of classes

Launch the Clip Art browser using the specified diagram file. When the user clicks OK in the browser, insert the currently selected diagram in the "Click here..." block.

Syntax

placementblockobject.BrowseDiagrams(filename)

Parameters

filename as String

Optional name of the diagram file. If omitted, defaults to the first .DGM file in the \SMASTERS\FLG directory.

Return values

None


Freelance Graphics: BrowseSymbols method

 See list of classes

Launch the Clip Art browser using the specified symbol file. When the user clicks OK in the browser, insert the currently selected symbol in the "Click here..." block.

Syntax

placementblockobject.BrowseSymbols(filename)

Parameters

filename as String

Optional name of the symbols file. If omitted, defaults to the first .SYM file in the \SMASTERS\FLG directory.

Return values

None


Freelance Graphics: Cascade method

 See list of classes

Cascades all document windows within the Freelance Graphics application window.

Syntax

applicationwindowobject.Cascade

Parameters

None

Return values

None

Examples

CurrentApplication.Cascade


Freelance Graphics: ClearSelection method

 See list of classes

Deselect all selected items.

Syntax

object.ClearSelection

Parameters

None

Return values

None

Examples

Selection.ClearSelection


Freelance Graphics: CloseWindow method

 See list of classes

Closes the Freelance Graphics application.

Syntax

applicationobject.CloseWindow(closewindow)

Parameters

closewindow as Integer

Optional and ignored.

Return values

None

Status codes

None

Examples

CurrentDocument.Save
CurrentDocument.CloseWindow


Freelance Graphics: Close method

 See list of classes

Close the Freelance Graphics application window (exit Freelance Graphics), or close a document or document window.

Syntax

documentobject.Close(savechanges, docname, location)

or

appwindowbject.Close

or

docwindowobject.Close(exitapplication)

Parameters

savechanges As Integer

Optional. If True (non-zero), changes are always saved. If False (zero), changes are never saved. If omitted, the user is consulted if the file has been changed.

docname As String

Optional. Document name.

location As String

Optional. Path.

exitapplication As Integer

Optional. If False (zero),  saves the document (if this is the first time the file is saved, opens the SaveAs dialog box, so user can enter a file name). If True (non-zero) or omitted, file closes without saving the document.

Return values

None

Usage

The Close method works slightly differently for each of the classes where it is available.

In the Document.Close case: If the first parameter, savechanges, is omitted, the user is consulted if the file is changed. If savechanges is True, the file is saved. If savechanges is False, the file is closed without being saved.

In the ApplicationWindow.Close case: The application simply closes, parameters are ignored. Nothing is saved.

In the DocWindow.Close case: There is only one parameter in this case. If the parameter, exitapplication, is False (zero), the file is saved. If the parameter, exitapplication, is True or omitted, the file is closed without being saved.

Examples

CurrentApplication.Close


Freelance Graphics: ColorToRGB method

 See list of classes

Return the RGB value of the color produced by the current values of the Red, Green, and Blue properties of a Color object.

Syntax

colorsobject.ColorToRGB(colorobject)

Parameters

colorobject as Color

The Color object whose RGB value you want returned.

Return values

Long, RGB value.

Examples

Dim MyColorRGB as Long
MyColorRGB = CurrentApplication.Colors.ColorToRGB(MyColor)


Freelance Graphics: Connect method

 See list of classes

Connect the currently selected line objects.

Syntax

selection.Connect

Parameters

None

Return values

None

Example

Selection.Connect


Freelance Graphics: ConvertTo method

 See list of classes

Convert the object to lines or polygons.

Syntax

drawobject.ConvertTo(conversiontype)

Parameters

conversiontype as Integer (Enumerated)

Value	Description
$ConvertToPolygons	Create one or more polygons from the object
$ConvertToLines	Create one or more lines from the object
Return values

None

Examples

Dim MyRect as DrawObject
Set MyRect = CurrentPage.CreateRect
MyRect.ConvertTo($ConvertToLines)


Freelance Graphics: CopyPage method

 See list of classes

Copy a page to the Clipboard.

Syntax

pageobject.CopyPage

Parameters

None

Return values

None

Examples

CurrentPage.CopyPage


Freelance Graphics: CopySelection method

 See list of classes

Copy the selection to the Clipboard.

Syntax

documentobject.CopySelection

Parameters

None

Return values

None

Examples

CurrentPage.CopySelection


Freelance Graphics: Copy method

 See list of classes

Copy an object to the Clipboard.

Syntax

drawobject.Copy

Parameters

None

Return values

None

Examples

CurrentSelection.Copy

or

Dim MyRect as DrawObject
Set MyRect = CurrentPage.CreateRect
MyRect.Copy


Freelance Graphics: CreateArrow method

 See list of classes

Draw an arrow on the page.

Syntax

pageobject.CreateArrow(xstart, ystart, xfinish, yfinish)

Parameters

xstart as Integer

(Optional, see note) Starting horizontal coordinate of the arrow, in twips.

ystart as Integer

(Optional, see note) Starting vertical coordinate of the arrow, in twips.

xfinish as Integer

(Optional, see note) Ending horizontal coordinate of the arrow, in twips.

yfinish as Integer

(Optional, see note) Ending vertical coordinate of the arrow, in twips.

Note	If you omit the parameters, the arrow will be centered on the page.

Return values

An instance of the DrawObject class (the drawn arrow).

Examples

Dim MyArrow as DrawObject
Set MyArrow = CurrentPage.CreateArrow(1000, 1000, 3000, 3000)


Freelance Graphics: CreateChart method

 See list of classes

Create a chart on the page.

Note	For more information on working with charts in LotusScript, search for ChartBase in the Help Index.

Syntax

pageobject.CreateChart(x, y, width, height)

Parameters

x as Integer

(Optional, see note) Right edge of the chart object relative to the left edge of the window, in twips.

y as Integer

(Optional, see note) Bottom edge of the chart object relative to the bottom of the window, in twips.

width as Integer

(Optional, see note) Width in twips.

height as Integer

(Optional, see note) Height in twips.

Note	If you omit the parameters, the chart will be centered on the page.

Return values

An instance of the DrawObject class (the drawn chart).

Examples

Dim MyChart as Chart
Set MyChart = CurrentPage.CreateChart(4000,10000,6000,6000)


Freelance Graphics: CreateComment method

 See list of classes

Create TeamReview comments on a page.

Syntax

pageobject.CreateComment(x, y, width, height)

Parameters

x as Integer

(Optional, see note) Right edge of the comment object relative to the left edge of the window, in twips.

y as Integer

(Optional, see note) Bottom edge of the comment object relative to the bottom of the window, in twips.

width as Integer

(Optional, see note) Width in twips.

height as Integer

(Optional, see note) Height in twips.

Note	If you omit the parameters, the comment will be centered on the page.

Return values

An instance of the DrawObject class (the TeamReview comments).

Examples

CurrentPage.CreateComment "Four score and seven years ago"


Freelance Graphics: CreateLine method

 See list of classes

Draw a line on the page.

Syntax

pageobject.CreateLine(xstart, ystart, xfinish, yfinish)

Parameters

xstart as Integer

(Optional, see note) Starting horizontal coordinate of the line, in twips.

ystart as Integer

(Optional, see note) Starting vertical coordinate of the line, in twips.

xfinish as Integer

(Optional, see note) Ending horizontal coordinate of the line, in twips.

yfinish as Integer

(Optional, see note) Ending vertical coordinate of the line, in twips.

Note	If you omit the parameters, the line will be centered on the page.

Return values

An instance of the DrawObject class (the drawn line).

Example

Dim MyLine as DrawObject
Set MyLine = CurrentPage.CreateLine(1000, 1000, 3000, 3000)


Freelance Graphics: CreateMovie method

 See list of classes

Add a movie to the page.

Syntax

pageobject.CreateMovie(x, y, width, height, filename)

Parameters

x as Integer

(Optional, see note) Left edge of the movie window relative to the left edge of the window, in twips.

y as Integer

(Optional, see note) Bottom edge of the movie window relative to the bottom of the window, in twips.

width as Integer

(Optional, see note) Width in twips.

height as Integer

(Optional, see note) Height in twips.

filename as String

 Name of the file containing the movie to be added to the page.

Note	If you omit the optional parameters, the movie will be located in a default position defined by the product.

Return values

An instance of the DrawObject class (the movie object).


Freelance Graphics: CreateObject method

 See list of classes

Available only in Freelance Graphics 97.

Controls the creation of an OLE object. The OLE object is an instance of the DrawObject class.

Syntax

PageObject.CreateObject(Class type As String|Filename As String, Link As Intger, DisplayIcon As Integer, x As Integer, y As Integer, w As Integer, h As Integer)

Parameters

ClassType As String

Optional only if the second parameter is present, otherwise this parameter is manditory. Input parameter.  The type of object that you want to embed in a presentation.  The list of object types includes a Bitmap Image, Paintbrush Picture, and so on. In Freelance Graphics choose Create - Object to see the list of objects available to you. The list is dependent on those OLE applications that you have on your system. Use the program name as it appears in the Windows registry or you can use the progid from the registry.

FileName As String

Optional only if the first parameter is present, otherwise this parameter is manditory. Input parameter. If creating the object from a file, use this parameter to show path and name of the file.

Link As Integer

Optional. Input. True (link) or false (embed), where false is zero, and true is any non-zero integer.

DisplayAsIcon As Integer

Optional. Input. True (displayed as an icon) or false (displayed as a metafile representation). Where false is zero, and true is any positive integer.

x As Integer

(Optional, see note) Input. Horizontal coordinate  measured in twips. The default value results in an object roughly centered on the page.

y As Integer

(Optional, see note) Input. Vertical coordinate  measured in twips. The default value results in an object roughly centered on the page.

w As Integer

(Optional, see note) Input. Width of area taken up by the OLE object measured in twips. The default value results in an object roughly centered on the page.

h As Integer

(Optional, see note) Input. Height of the area taken up by the OLE object measured in twips. The default value results in an object roughly centered on the page.

Note	If you omit the parameters, the object will be centered on the page.

Return values

Returns a OLEObject class reference.

Usage

Either the first or second parameter must be present.

Example

' In this example, you create an instance of an OLE object (a Paintbrush picture).

Set MyOLE = CurrentPage.CreateObject ("PaintBrush Picture")


Freelance Graphics: CreateOval method

 See list of classes

Draw an oval on the page.

Syntax

pageobject.CreateOval(xcenter, ycenter, width, height)

Parameters

xcenter as Integer

(Optional, see note) Horizontal coordinate starting at the top-left "corner" of the oval, in twips.

ycenter as Integer

(Optional, see note) Vertical coordinate starting at the top-left "corner" of the oval, in twips.

width as Integer

(Optional, see note) Width of the oval, in twips.

height as Integer

(Optional, see note) Height of the oval, in twips.

Note	If you omit the parameters, the oval will be centered on the page.

Return values

An instance of the DrawObject class (the drawn oval).

Examples

Dim MyOval as DrawObject
Set MyOval = CurrentPage.CreateOval(1000, 1000, 3000, 3000)


Freelance Graphics: CreatePageFromTemplate method

 See list of classes

Create a new page using a content topic.

Syntax

document.CreatePageFromTemplate pagetitle, templateindex

Parameters

PageTitle as String

Name for the new page.

TemplateIndex as Integer

Identifies the content topic page type (the first type is 1).

Return values

An instance of the Page class.


Freelance Graphics: CreatePage method

 See list of classes

Create a new page.

Syntax

documentobject.CreatePage pagetitle, masterindex

Parameters

pagetitle as String

Name for the new page

masterindex as Integer

Identifies the SmartLook to be used (1--refers to the first one in the list of SmartLooks that are on your system; 2--refers to the second, and so on). To see the list of SmartLooks: in the main menu, choose Presentation - Choose a Different SmartMaster Look.

Return values

An instance of the Page class.

Examples

Dim Page1 as Page
Set Page1 = CurrentDocument.CreatePage("My Title Page",1)


Freelance Graphics: CreatePlacementBlock method

 See list of classes

Create a "Click here..." block.

Syntax

pageobject.CreatePlacementBlock(x, y, width, height, blocktype, text)

Parameters

x as Integer

(Optional, see note) Left edge of the object relative to the left edge of the window, in twips.

y as Integer

(Optional, see note) Bottom edge of the object relative to the bottom of the window, in twips.

width as Integer

(Optional, see note) Width in twips.

height as Integer

(Optional, see note) Height in twips.

blocktype as Variant

Value	Description
pbTypeText	Click here to enter text
pbTypeSymbol	Click here to add a symbol
pbTypeChart	Click here to create a chart
pbTypeOrgChart	Click here to create an organization chart
pbTypeTable	Click here to create a table
pbTypeButton	Click here to add a button
text as String

Prompt text to include in the "Click here..." box.

Note	If you omit the optional parameters, the block will be centered on the page.

Return values

An instance of the DrawObject class.


Freelance Graphics: CreateRect method

 See list of classes

Draw a rectangle on the page.

Syntax

pageobject.CreateRect(xcenter, ycenter, width, height)

Parameters

xcenter as Integer

(Optional, see note) Horizontal coordinate starting at the top-left corner of the rectangle, in twips.

ycenter as Integer

(Optional, see note) Vertical coordinate starting at the top-left corner of the rectangle, in twips.

width as Integer

(Optional, see note) Width of the rectangle, in twips.

height as Integer

(Optional, see note) Height of the rectangle, in twips.

Note	If you omit the parameters, the rectangle will be centered on the page.

Return values

An instance of the DrawObject class (the drawn rectangle).

Examples

Dim MyRect as DrawObject
Set MyRect = CurrentPage.CreateRect(1000, 1000, 2000, 2000)


Freelance Graphics: CreateStyle method

 See list of classes

Create a new named style based on the attributes of the text block.

Syntax

textblockobject.CreateStyle(stylename)

Parameters

stylename as String

Name of the new style.

Return values

None


Freelance Graphics: CreateSymbol method

 See list of classes

Add a symbol to the page.

Syntax

pageobject.CreateSymbol(filename, index, x, y, width, height)

Parameters

filename as String

Name of the file containing the symbol.

index as Integer

 Sequence number of the symbol in the file.

x as Integer

(Optional, see note) Left edge of the symbol relative to the left edge of the window, in twips.

y as Integer

(Optional, see note) Bottom edge of the symbol relative to the bottom of the window, in twips.

width as Integer

(Optional, see note) Width in twips.

height as Integer

(Optional, see note) Height in twips.

Note	If you omit the optional parameters, the symbol will be centered on the page.

Return values

An instance of the DrawObject class (the symbol object).


Freelance Graphics: CreateTable method

 See list of classes

Create a table on the page.

Syntax

pageobject.CreateTable(type, rows, columns, x, y, width, height)

Parameters

type as Integer

See the Create Table dialog's Table Gallery for examples of the following grid types.

Value	Description
1	Full grid
2	Grid except for first row and column
3	Outline around outside of table
4	No grid lines
rows as Integer

Number of rows.

columns as Integer

Number of columns.

x as Integer

(Optional, see note) Left edge of the table relative to the left edge of the window, in twips.

y as Integer

(Optional, see note) Bottom edge of the table relative to the bottom of the window, in twips.

width as Integer

(Optional, see note) Width in twips.

height as Integer

(Optional, see note) Height in twips.

Note	If you omit the optional parameters, the table will be centered on the page.

Return values

An instance of the Table class.


Freelance Graphics: CreateText method

 See list of classes

Create a text block.

Syntax

pageobject.CreateText(x, y, width, height)

Parameters

x as Integer

(Optional, see note) Left edge of the text block relative to the left edge of the window, in twips.

y as Integer

(Optional, see note) Top edge of the text block relative to the bottom of the window, in twips.

width as Integer

(Optional, see note) Width in twips.

height as Integer

(Optional, see note) Height in twips.

Note	If you omit the parameters, the text will be centered on the page.

Return values

An instance of the DrawObject class.


Freelance Graphics: CutPage method

 See list of classes

Cut a Page object and place it on the Clipboard.

Syntax

pageobject.CutPage

Parameters

None

Return values

None

Examples

CurrentPage.CutPage


Freelance Graphics: CutSelection method

 See list of classes

Cut the current selection and place it on the Clipboard.

Syntax

documentobject.CutSelection

Parameters

None

Return values

None

Examples

CurrentSelection.CutSelection


Freelance Graphics: Cut method

 See list of classes

Cut a DrawObject and place it on the Clipboard.

Syntax

drawobject.Cut

Parameters

None

Return values

None

Examples

Dim MyRect as DrawObject
Set MyRect = CurrentPage.CreateRect()
MyRect.Cut


Freelance Graphics: DeleteCol method

 See list of classes

Delete a specified column from the table.

Syntax

tableobject.DeleteCol(column)

Parameters

column as Integer

 Number of the column to delete.

Return values

None


Freelance Graphics: DeletePage method

 See list of classes

Delete the specified page.

Syntax

documentobject.DeletePage(pageobject)

Parameters

pageobject as Page

 The page to delete.

Return values

None


Freelance Graphics: DeleteReviewer method

 See list of classes

Open the dialog box used to delete a TeamReview reviewer.

Syntax

documentobject.DeleteReviewer

Parameters

None

Return values

None


Freelance Graphics: DeleteRow method

 See list of classes

Delete a specified row from the table.

Syntax

tableobject.DeleteRow(row)

Parameters

row as Integer

 The number of the row to delete.

Return values

None


Freelance Graphics: DeleteSpeakerNote method

 See list of classes

Delete speaker notes from the page.

Syntax

pageobject.DeleteSpeakerNote

Parameters

None

Return values

None

Examples

CurrentPage.DeleteSpeakerNote


Freelance Graphics: Deselect method

 See list of classes

Clear all the selected objects on the current page.

Syntax

documentobject.Deselect

Return values

None

Example

CurrentDocument.Deselect


Freelance Graphics: DistributeForComment method

 See list of classes

Open the Distribute for Comment dialog box.

Syntax

documentobject.DistributeForComment

Parameters

None

Return values

None


Freelance Graphics: DoVerb method
Freelance Graphics DoVerb method

 See list of classes

Available only in Freelance Graphics 97.

DoVerb is a variant.

Syntax

OLEObject.DoVerb(Index)

Parameters

Index As Integer

Indicates which action to take. Starts with zero. Indicates whatever action is available for this instance of the OLEObject.  For example, a Freelance Graphics presentation OLE object has the actions: Edit presentation, Run Screen Show, and Convert. These actions correspond to the index values of 0, 1, and 2, respectively.

Return values

None.

Usage

You use this method to perform actions on an instance of the OLEObject.

Example

' In this example, you create an instance of an OLE object
' (a Paintbrush picture), and then using the reference, MyOLE, you
' use the DoVerb method to act on the created object.

Set MyOLE = CurrentPage.CreateObject ("PaintBrush Picture")
EDITPICT = 0
MyOLE.DoVerb EDITPICT


Freelance Graphics: EnterEditMode method
Freelance Graphics: EnterEditMode

 See list of classes

Enter edit mode on a text block.

Syntax

textblockobject.EnterEditMode

Parameters

None

Return values

None


Freelance Graphics: FindNextObject method

 See list of classes

Find the next occurrence of the specified named object on the Page.

Note	Use FindObject to find the first occurrence of an object on a Page.

Syntax

pageobject.FindNextObject(objectname, afterme)

Parameters

objectname as String

Name of the object to find.

afterme as DrawObject

(Optional) The object after which to begin the search.

Return values

An instance of the DrawObject class (the found object).

Examples

Dim Rect2 as DrawObject
Set Rect2 = CurrentPage.FindNextObject("MyRect")


Freelance Graphics: FindObject method

 See list of classes

Find the first occurrence of the specified named object in the Document or on the Page.

Note	Use FindNextObject to find subsequent occurrences of an object on a Page.

Syntax

object.FindObject(objectname)

Parameters

objectname as String

 Name of the object to find.

Return values

An instance of the DrawObject class.

Examples

Dim Rect1 as DrawObject
Set Rect1 = CurrentPage.FindObject("My Rect")


Freelance Graphics: Flip method

 See list of classes

Flip the object top-to-bottom or left-to-right.

Syntax

drawobject.Flip(flipdirection)

Parameters

flipdirection as Variant (Enumerated)

Value	Description
$FlipLeftToRight	Mirror the image on the vertical plane
$FlipTopToBottom	Mirror the image on the horizontal plane
Return values

None

Examples

CurrentSelection.Flip($FlipLeftToRight)


Freelance Graphics: GetBulletCount method

 See list of classes

Return the number of bulleted items in the text block.

Syntax

textblock.GetBulletCount

Parameters

None

Return values

Number of bullets (Integer)


Freelance Graphics: GetCell method

 See list of classes

Return the specified cell as a drawn object.

Syntax

tableobject.GetCell(row, column)

Parameters

row as Integer

Row number of the row containing the text.

column as Integer

Column number of the column containing the text.

Return values

An instance of the TextBlock class.


Freelance Graphics: GetEnum method

 See list of classes

Resolve the specified enumerated type to its value. This is useful for cross-application scripts.

Syntax

applicationobject.GetEnum(enumerationname)

Parameters

enumerationname as Variant

An enumeration name as a string, with or without the $.

Return values

Value of the specified enumeration name.

Example

CurrentApplication.GetEnum("ViewDraw")


Freelance Graphics: GetIndex method

 See list of classes

Returns the index (e.g., the fifth object in the set).

Syntax

objectset.GetIndex(object, startingindex)

Parameters

object as object

The instance of the object whose index you want.

startingindex as Integer

Optional starting position in the set for the search.

Return values

Integer indicating the object occurrence within the set of objects (for example, the page number of a specified page within the set of pages).

Example

Dim ThisIndex as Integer
ThisIndex = CurrentPage.Objects.GetIndex(MyRect)

or

Dim ThisIndex as Index
ThisIndex = CurrentApplication.Colors.GetIndex(MyColor)


Freelance Graphics: GetMarkup method

 See list of classes

Return the text and all markup attributes from a TextBlock, as a string.

Syntax

textblockobject.GetMarkup

Parameters

None

Return values

A string containing the text from a TextBlock object, and all markup attributes for that text.


Freelance Graphics: GetNearestColor method

 See list of classes

Return the closest available color (in the Freelance Color Library) to the color specified.

Syntax

colorsobject.GetNearestColor(colorobject)

Parameters

colorobject as Color

 The Color object whose color you want to match as closely as possible.

Return values

An object of the Color class that is the closest match to the passed color.

Example

Dim MyLibraryColor as Color
Dim MyColor as Color
Set MyColor = CurrentApplication.Colors.RGBToColor(17395023)
Set MyLibraryColor = CurrentApplication.Colors.GetNearestColor(MyColor)


Freelance Graphics: GetNearestIndex method

 See list of classes

Return the index of the closest available color for the color specified.

Syntax

colorobject.GetNearestIndex(colorobject)

Parameters

colorobject as Color

 The Color object whose color you want to match as closely as possible.

Return values

An integer containing the index of the Color class that is the closest match to the passed color.


Freelance Graphics: GetNthBullet method

 See list of classes

Return the text from the nth bulleted item within the text block.

Syntax

textblockobject.GetNthBullet(n)

Parameters

n as Integer

Sequence number of the bullet.

Return values

A string containing the text from the nth bulleted item.


Freelance Graphics: GetObjectData method

 See list of classes

Return user-defined object data (persistent, string-valued name and value pair).

Syntax

drawobject.GetObjectData(variablename)

Parameters

variablename as String

Name of a user-defined variable.

Return values

String containing the value of the named variable.


Freelance Graphics: GetRGB method

 See list of classes

Return the RGB value of the color produced by the current values of the Red, Green, and Blue properties of a Color object.

Syntax

colorobject.GetRGB

Parameters

None

Return values

Long, RGB value.

Examples

Dim RGBValue as Long
RGBValue = MyColor.GetRGB()


Freelance Graphics: GetSelection method

 See list of classes

Returns the specified selected object from the set of currently selected objects.

Syntax

objectselection.GetSelection(objectnumber)

Parameters

objectnumber as Integer

The number of the object or page to be returned.

Return values

The DrawObject at the specified index in the selection.

Examples

'with at least two draw objects selected:
Dim Rect2 as DrawObject
Set Rect2 = Selection.GetSelection(2)


Freelance Graphics: GetSpeakerNoteMarkup method

 See list of classes

Return the text from the speaker notes from a page, including all markups.

Syntax

pageobject.GetSpeakerNoteMarkup

Parameters

None

Return values

A string containing the text from the speaker notes for a page, and all markup attributes for that text.


Freelance Graphics: GotoNotes method

 See list of classes

Switch window focus to Lotus Notes. (If Notes is not running, it will be launched.)

Syntax

applicationwindow.GotoNotes

Parameters

None

Return values

None


Freelance Graphics: GotoPage method

 See list of classes

Go to the page specified by a page number, page name, or object name.

Syntax

documentobject.GotoPage pageindicator

Parameters

pageindicator as Variant

Page number (integer), page name (string), or Page object.

Return values

None

Examples

CurrentDocument.GotoPage(5)


Freelance Graphics: Group method

 See list of classes

Group currently selected objects.

Syntax

selectionobject.Group

Parameters

None

Return values

A new instance of a grouped DrawObject.

Examples

Dim MyGroup as DrawObject
Set MyGroup = Selection.Group()


Freelance Graphics: Import method

 See list of classes

Import a file.

Syntax

documentobject.Import(filename, includewithfile, converttopostscript, includetemplate, codepage)

Parameters

filename as String

 Name of the file to import.

includewithfile as Integer (Enumerated)

Value	Description
TRUE (-1)	Include the imported file with the presentation
FALSE (0)	Do not include the imported file (default)
converttopostscript as Integer (Enumerated)

Value	Description
TRUE (-1)	Convert the imported file to PostScript
FALSE (0)	Do not convert the imported file (default)
includetemplate as Integer (Enumerated)

Value	Description
TRUE (-1)	Include the imported template with the presentation
FALSE (0)	Do not include the imported template (default)
codepage as integer

Identifies a special code page for the import operation (defaults to 0).

Return values

The imported object.


Freelance Graphics: InsertCol method

 See list of classes

Insert a new column as the specified column in a table.

Syntax

tableobject.InsertCol(newcolumnnumber)

Parameters

newcolumnnumber as Integer

The column number of the new column in the table.

Return values

None


Freelance Graphics: InsertRow method

 See list of classes

Insert a new row as the specified row in a table.

Syntax

tableobject.InsertRow(newrownumber)

Parameters

newrownumber as Integer

The row number of the new row in the table.

Return values

None


Freelance Graphics: Insert method

 See list of classes

Insert the specified object in a placement ("Click here...") block.

Syntax

placmentblockobject.Insert object

Parameters

object as DrawObject

The object to be inserted in the "Click here..." block.

Return values

None


Freelance Graphics: IsEmpty method

 See list of classes

Test if a collection type object (Colors, Documents, Objects, or Pages) is empty (contains no items).

Syntax

objectcollection.IsEmpty

Parameters

None

Return values

Integer (Boolean)

Value	Description
TRUE	There are no items in the object
FALSE	There are one or more items in the object
Examples

If CurrentPage.Objects.IsEmpty() Then
Print "There are no objects on this page"
End If


Freelance Graphics: Item method

 See list of classes

Return an item from a collection type object (Colors, Documents, Objects, or Pages).

Syntax

objectcollection.Item(index)

Parameters

index as Variant

The index of the item to return, or the name of the color.

Return values

An instance of the Color, Document, DrawObject, or Page class.

Examples

Dim MyPage2 as Page
Set MyPage2 = CurrentDocument.Pages.Item(2)

or

Dim MyBlueColor as Color
Dim MyGreenColor as Color
Set MyBlueColor = CurrentApplication.Colors.Item("Blue")
Set MyGreenColor = CurrentApplication.Colors.Item(35)


Freelance Graphics: LeaveEditMode method
Freelance Graphics: LeaveEditMode

 See list of classes

Leave edit mode for the text block (simulate clicking outside that block).

Syntax

textblockobject.LeaveEditMode

Parameters

None

Return values

None


Freelance Graphics: Maximize method

 See list of classes

Maximize the Freelance application or document window.

Syntax

windowobject.Maximize

Parameters

None

Return values

None

Examples

CurrentApplicationWindow.Maximize

or

CurrentDocWindow.Maximize


Freelance Graphics: Minimize method

 See list of classes

Minimize the Freelance application or document window.

Syntax

windowobject.Minimize

Parameters

None

Return values

None

Examples

CurrentApplicationWindow.Minimize

or

CurrentDocWindow.Minimize


Freelance Graphics: Move method

 See list of classes

Move an object to a new position on the page, or move a page to or before the specified page number.

Syntax

drawobject.Move xtwips, ytwips

or

pageobject.Move pagenumber, insertbefore

Parameters

xtwips as Long

 Horizontal twips to move (positive moves to right, negative to left).

ytwips as Long

 Vertical twips to move (positive moves up, negative down).

pagenumber as Integer

Page number of the new page, or page before which to insert the new page (see note).

insertbefore as Integer (Enumerated)

(Optional)

Value	Description
TRUE (-1)	Insert the page before the specified page number
FALSE (0)	(Default) Insert the page at the specified page number
Return values

None


Freelance Graphics: NearestColorFromRGB method

 See list of classes

Return the Freelance Graphics palette color that is the closest match to the specified RGB value.

Syntax

applicationobject.NearestColorFromRGB(rgbvalue)

Parameters

rgbvalue as Long

Any RGB value.

Return values

An instance of the Color class.

Examples

Dim MyColor as Color
Set MyColor = CurrentApplication.NearestColorFromRGB(1598564)


Freelance Graphics: NewDocument method

 See list of classes

Create a new presentation by showing the user interface, with optional parameters supplying default values or selections.

Syntax

applicationobject.NewDocument name, location, kind, mastername, masterlocation

Parameters

Note	The first three parameters are ignored. You must save a document to name it.

name as String

Optional file name.

location as Variant

Optional location of the file.

kind as String

Optional file type.

mastername as String

Optional content topic (.SMC) or SmartLook (.MAS) file name.

masterlocation as Variant

Optional content topic set location (must contain a string).

Return values

Returns the new document as an instance of the Document class.


Freelance Graphics: OpenDocumentFromInternet method

 See list of classes

Available only in Freelance Graphics 97.

Opens an existing .PRZ, .PRE, .SMC, .MAS, .SYM, .DGM, or .PAL document from the Internet, analogous to the OpenDocument function. Returns the document.

Syntax

ApplicationObject.OpenDocumentFromInternet(URL, DocType, Password, MakeVisible, UserId, UserPassword, UsePassiveConnection, ProxyServerAddress, ProxyPort, ProxyType)

Parameters

URL As String

Optional. Universal Resource Language location (e.g. "ftp://Radium/users/bob/test.123"), if omitted the interactive dialog will appear to prompt the user.

DocType As String

Optional.

Password As String

Optional.

MakeVisible As Integer

Optional (Freelance Graphics ignors this parameter).  Integer used as a boolean:  Any non-zero integer is true.  False is zero.

UserId As String

Optional. The id required by the host.

UserPassword As String

Optional. The password required for the host.

UsePassiveConnection As Integer

Optional. Integer used as a boolean. True (any non-zero integer is true): your internal network is connected to the Internet through a firewall that supports passive transfers. False (that is, zero): the fire wall does not accept passive transfers.

ProxyServerAddress As String

Optional. Server IP Address or Domain Name

ProxyPort As Integer

Optional. Choose from the available proxy ports.

ProxyType As Integer

Optional. A World Wide Web page is INT_WWW (1) or an FTP file is INT_FTP (2)

Return values

Returns an instance of the Document class.

Usage

Use this method to open a Freelance Graphics file on the internet.


Freelance Graphics: OpenDocumentFromNotes method

 See list of classes

Available only in Freelance Graphics 97.

Opens a document attached to a Notes document. Returns the document

Syntax

ApplicationObject.OpenDocumentFromNotes(AttachedFileName As String, UniversalNotesIs, FieldName, databasePath, ServerName, DocType, Password, OpenAsReadOnly, MakeVisible)

Parameters

AttachedFileName As String

Optional. For example, a file name such as"test.123".  If omitted the interactive dialog will appear to prompt the user.

UnvervisalNotesId As String

Optional. For example, "150DFE45F1089B790065828D852562CA"

FieldName As String

Optional. For example, "Body"

DatabasePath As String

Optional.  For example, "Databases\Docs in Progress.nsf"

ServerName As String

Optional.  For example, "Local"

DocType As String

Optional. For example, ".PRZ"

Password As String

Optional. Password of document to open.

OpenAsReadOnly As Integer

Optional (Freelance Graphics ignores this parameter). Integer used as a boolean: Any non-zero integer is true.  False is zero.

MakeVisible As Integer

Optional (Freelance Graphics ignores this parameter). Integer used as a boolean: Any non-zero integer is true.  False is zero.

Return values

Returns an instance of the Document class.

Usage

Use this method to open a presentation that is imbedded a Notes docment.

Example

CurrentApplication.OpenDocumentFromNotes "test.prz", "somenotesid", _
          "Body", "Progress.nsf", "Local"


Freelance Graphics: OpenDocument method

 See list of classes

Open a presentation for editing.

Syntax

applicationobject.OpenDocument name, location, kind, readonly, makevisible

Parameters

name as String

File name of the presentation file to be opened.

location as Variant

Optional path for the file (must contain a string; defaults to the working directory).

kind as String

Optional file type (defaults to PRZ).

readonly as Integer (Enumerated)

Optional read-only flag.

Value	Description
TRUE (-1)	Read-only
FALSE (0)	Read-write (default)
makevisible as Integer (Enumerated)

Ignored and always treated as TRUE (this parameter is declared for compatibility with Open methods in other Lotus products).

Value	Description
TRUE (-1)	Visible (default)
FALSE (0)	Invisible (ignored)
Return values

Returns the opened document as an instance of the Document class.


Freelance Graphics: OpenPresForCopy method

 See list of classes

Open a presentation from which pages can be copied (similar to the presentation browser, however, this method does not open or use the presentation browser).

Syntax

documentobject.OpenPresForCopy(presentationname)

Parameters

presentationname As String

Name of the presentation file to open in the browser.

Return values

None

Usage

Use this method only in conjunction with two other methods: SelectPageForCopy method and PasteSelectedPages method.

Example

Sub CopyAPage

CurrentDocument.OpenPresentationForCopy "turtle.prz"
CurrentDocument.SelectPageForCopy 1
CurrentDocument.PasteSelectedPages 1

End Sub


Freelance Graphics: PastePage method

 See list of classes

Pastes a page into the current document after the current page.

Syntax

documentobject.PastePage

Parameters

None

Return values

Returns a Page object.

Usage

Before calling this method, a Freelance Graphics page must have been placed on the clipboard by a user or by a script command.


Freelance Graphics: PasteSelectedPages method

 See list of classes

Paste into the document the page(s) copied by the SelectPageForCopy method.

Syntax

documentobject.PasteSelectedPages(pagestartnum)

Parameters

pagestartnum as Integer

Where the selected pages are to be pasted.

Value	Description
0	After the current page
1	Before the current page
2	At the end of the presentation
Return values

None


Freelance Graphics: PasteSpecial method

 See list of classes

Paste the Clipboard contents onto the page using a special format (bitmap or chart, for example).

Syntax

pageobject.PasteSpecial(clipboardformat)

Parameters

clipboardformat as String

Any of the Clipboard formats displayed in the Paste Special dialog, or OLE object for an OLE object on the Clipboard.

Return values

The pasted object (a new instance of the DrawObject class).


Freelance Graphics: Paste method

 See list of classes

Paste the Clipboard contents onto the page or into the document.

Syntax

object.Paste(makevisible)

Parameters

makevisible as Integer (Enumerated)

Ignored and always treated as TRUE (this parameter is declared for compatibility with Paste methods in other Lotus products).

Value	Description
TRUE (-1)	Make the pasted page(s) visible (default)
FALSE (0)	Make the pasted page(s) invisible (ignored)
Return values

If pasting to a Page, the pasted object (a new instance of the DrawObject class);  if pasting to a Document, no return value.


Freelance Graphics: Play method

 See list of classes

Play a media object (a sound or a movie).

Syntax

mediaobject.Play

Parameters

None

Return values

None


Freelance Graphics: PrintOut method

 See list of classes

Print the presentation.

Syntax

documentobject.Print frompage, topage, copies

Parameters

frompage as Integer

Starting page number to print.

topage as Integer

Ending page number to print.

copies as Integer

Number of copies to print.

Return values

None

Usage

This method is identical to the Print method.


Freelance Graphics: Print method

 See list of classes

Print the presentation.

Syntax

documentobject.Print frompage, topage, copies

Parameters

frompage as Integer

Starting page number to print.

topage as Integer

Ending page number to print.

copies as Integer

Number of copies to print.

Return values

None

Usage

This method is identical to the PrintOut method.


Freelance Graphics: PublishToWeb method

 See list of classes

Available only in Freelance Graphics 97.

Saves a presentation in HTML format (including GIF files, content page, link to presentation, speaker notes, and so on).

Syntax

DocumentObject.PublishToWeb(FileName, FileType, Netscape, Resolution, Contents, LinkPres, SpkNote, Media, Email, EmailName, EmailAddr)

Parameters

FileName As String

Name of main HTM file.  If directory is not specified, uses work directory.  Appends ".HTM", if not specified.

FileType As Variant

Optional parameter.

$NonHTML20 = Not HTML 2.0 (Default)

$HTML20CERN = HTML 2.0 CERN

$HTML20NCSA = HTML 2.0 NCSA

Netscape As Integer

Optional parameter.

FALSE = not Netscape Enhanced HMTL 2.0

TRUE = Netscape Enhanced HMTL 2.0 (Default)

Resolution As Variant

Optional parameter.

$Res640x480

$Res800x600 (Default)

$Res1024x768

$Res1280x1024

Contents As Integer

Optional parameter.

FALSE = no table of contents

TRUE = table of contents (Default)

LinkPres As Integer

Optional parameter.

FALSE = no link to PRZ file (Default)

TRUE = add link

LotusLink As Integer

Optional parameter.

FALSE = no button linked to Lotus Home Page

TRUE = add button linked to Lotus Home Page (Default)

SpkNote As Integer

Optional Parameter.

FALSE = no speaker notes

TRUE = publish speaker notes (Default)

Media As Integer

Optional Parameter.

FALSE = don't publish multimedia data (Default)

TRUE = publish multimedia data

Email As Integer

Optional Parameter. If this parameter is TRUE, then EmailName and EmailAddr parameters must be included.

FALSE = no mail to URL (Default)

TRUE = add mail to URL

EmailName As String

Optional Parameter. However, if Email is True, this parameter must be included.

String for name in mail to URL.

EmailAddr As String

Optional Parameter. However, if Email is True, this parameter must be included.

String form email address in mail to URL.

Return values

None.

Usage

You can use PublishToWeb to save a presentation in HTML format.


Freelance Graphics: PutIntoPlacementBlock method

 See list of classes

Place an object in a "Click here..." block.

Syntax

drawobject.PutIntoPlacementBlock(placementblockid)

Parameters

placementblockid as Integer

An integer identifying the "Click here..." block.

Return values

None


Freelance Graphics: Quit method

 See list of classes

Exit Freelance Graphics.

Syntax

applicationobject.Quit

Parameters

None

Return values

None


Freelance Graphics: RemoveFromSelection method

 See list of classes

Remove the specified object from the set of currently selected objects.

Syntax

objectcollection.RemoveFromSelection object

Parameters

object as DrawObject

 The object you want removed from the selection.

Return values

None

Examples

Selection.RemoveFromSelection MyRect2


Freelance Graphics: Remove method

 See list of classes

Delete a DrawObject or Page object.

Syntax

object.Remove

Parameters

None

Return values

None

Examples

CurrentSelection.Remove


Freelance Graphics: Replicate method

 See list of classes

Replicate an object.

Syntax

drawobject.Replicate

Parameters

None

Return values

A new instance of the replicated object.


Freelance Graphics: Restore method

 See list of classes

Restore the Freelance Graphics application or document window.

Syntax

windowobject.Restore

Parameters

None

Return values

None


Freelance Graphics: RevertToStyle method

 See list of classes

Revert to the named style for a Background, Border, Font, LineStyle, or TextBlock object.

Note	For this release, the RevertToStyle method has no effect any object class.

Syntax

object.RevertToStyle(attributename)

Parameters

attributename AS String

Optional input parameter.

Return values

None


Freelance Graphics: RGBtoColor method

 See list of classes

Return the Color class object that matches the RGB value specified.

Syntax

colorsobject.RGBtoColor(colornumber)

Parameters

colornumber as Long

An RGB value.

Return values

Color class object matching the RGB value specified.

Examples

Dim MyColor as Color
Set MyColor = CurrentApplication.Colors.RGBToColor(1598564)


Freelance Graphics: Rotate method

 See list of classes

Rotate the object a specified number of degrees around a specified anchor point.

Syntax

drawobject.Rotate xanchor, yanchor, degrees

Parameters

xanchor as Long

Horizontal coordinate of the anchor point in twips.

yanchor as Long

Vertical coordinate of the anchor point in twips.

degrees as Double

Degrees of rotation in a counterclockwise direction.

Return values

None


Freelance Graphics: RunDialog method

 See list of classes

Launch one of five hard-coded dialogs.

Syntax

documentobject.RunDialog(dialogtype, dialogcaption, maintext, p4, p5, p6, p7, p8, p9, p10, p11, p12)

Parameters and return values (by dialog type)

The first three parameters are the same for all five dialog types. The usage of parameters 4-12 and the return values vary by dialog type. The common parameters are described first, followed by the dialog-specific parameters and return values for each dialog type.

This method always returns a packed 32-bit (integer) value. In the descriptions of the return values, bit 0 is the least significant bit of the integer.

Common parameters

For all dialogs the first three parameters are always the same.

dialogtype as Integer

Value	Description
1	Two radio buttons, each with an associated spinner control
2	Seven check boxes
3	Four radio buttons, optional second text box
4	Three check boxes, optional second text box
5	List box with up to seven items
dialogcaption as String

The text to display in the caption (title bar) of the dialog.

maintext as String

Instructional text for a display-only text box in the dialog.

The use of the remaining parameters varies depending on the value of first parameter (dialogtype).

Note	Parameters 4-10 are always type String, although for some dialog types they contain string representations of numerics. Parameters 11 and 12 are always type Integer.

Type 1 (two radio buttons, each with an associated spinner control) parameters

Parameter	Description
p4	String for first radio button
p5	String for second radio button
p6	String containing the number of the radio button selected initially
p7, p8	Unused
p9	String containing the first spinner minimum value
p10	String containing the first spinner maximum value
p11	Integer containing the second spinner minimum value
p12	Integer containing the second spinner maximum value
Type 1 return values

Bit(s)	Description
0-7	The value set by the spinner control for the selected radio button when the dialog was closed
8	The radio button selected on return: 0 = first 1 = second
9	How the user closed the box: 0 = selected Cancel 1 = selected OK
10-31	Unused
Type 2 (seven check boxes) parameters

Parameter	Description
p4-p10	Strings for check boxes 1-7; each parameter is the string to display with the corresponding check box
p11	Initial state of the check boxes; True (non-zero) sets all check boxes as checked; False (zero) sets all check boxes as unchecked.
p12	Unused
Type 2 return values

Bit(s)	Description
0-6	Indicates which boxes were selected on return: 0 = not selected 1 = selected
7	Unused
8	How the user closed the box: 0 = selected Cancel 1 = selected OK
9-31	Unused

Type 3 (four radio buttons, optional second text box) parameters

Parameter	Description
p4-p7	Strings for radio buttons 1-4; each parameter is the string to display with the corresponding radio button
p8	String for optional second text block
p9-p12	Unused
Type 3 return values

Bit(s)	Description
0-2	A binary number indicating which radio button was selected on return (for example, 110 indicates that button three was selected)
3-7	Unused
8	How the user closed the box: 0 = selected Cancel 1 = selected OK
9-31	Unused

Type 4 (three check boxes, optional secondary text) parameters

Parameter	Description
p4-p6	Strings for check boxes 1-3; each parameter is the string to display with the corresponding check box
p7	String for optional secondary text block
p8-p10	Unused
p11	Initial state of the check boxes; True (non-zero) sets all check boxes as checked; False (zero) sets all check boxes as unchecked.
p12	Unused
Type 4 return value

Bit(s)	Description
0-2	Indicates which boxes were selected on return: 0 = not selected 1 = selected
3-7	Unused
8	How the user closed the box: 0 = selected Cancel 1 = selected OK
9-31	Unused

Type 5 (list box with up to seven items) parameters

Parameter	Description
p4-p10	Up to seven strings; each string is a separate entry in the list box
p11-p12	Unused
Type 5 return values

Bit(s)	Description
0-2	A binary number indicating which item in the list box was selected on return (for example, 110 indicates that item three was selected)
3-7	Unused
8	How the user closed the box: 0 = selected Cancel 1 = selected OK
9-31	Unused
Examples

' Example of posting Dialog 2 and interpreting results...

DIM PackedVal as Integer

PackedVal = CurrentDocument.RunDialog (2, "DialogTitle", "StaticText",_

"CheckBox 1", "CheckBox 2", "CheckBox 3", "CheckBox 4", "CheckBox 5",_

"CheckBox 6", "CheckBox 7", FALSE, 0)

For I = 1 TO 7

    IF PackedVal AND (2^(I-1)) THEN

       Print "CheckBox "+Str$(I)+" was enabled."

    ELSE

        Print "CheckBox "+Str$(I)+" was disabled."

    END IF

NEXT I


Freelance Graphics: SameColor method

 See list of classes

Compare the color of two Color class objects to determine if they have the same RGB value.

Syntax

colorobject1.SameColor(colorobject2)

Parameters

colorobject2 as Color

 An object of class Color.

Return values

Integer (Boolean).

Value	Description
TRUE	Same color
FALSE	Different colors
Examples

If Color1.SameColor(Color2) Then
Print "Color2 is identical to Color1"
End If


Freelance Graphics: SaveAsToInternet method

 See list of classes

Available only in Freelance Graphics 97.

Saves the document to the Internet (analogous to the SaveAs method).

Syntax

DocumentObject.SaveAsToInternet(URL, DocType, Password, UserID, UserPassword, UsePassiveConnection, ProxyServerAddress, ProxyPort, ProxyType)

Parameters

URL As String

Optional. Universal Resource Language location (e.g. "ftp://Radium/users/bob/test.123"), if omitted the interactive dialog will appear to prompt the user.

DocType As String

Optional. For example: ".PRZ". The options are: .PRZ, .PRE, .SMC, .MAS, .SYM, .DGM, .PAL, and .HTM.

Password As String

Optional. The document password.

UserID As String

Optional. The user's id for the Internet server.

UserPassword As String

Optional.

UsePassiveConnection As Integer

Optional. Integer used as a boolean. True (any non-zero integer is true): your internal network is connected to the Internet through a firewall that supports passive transfers. False (that is, zero): the fire wall does not accept passive transfers.

ProxyServerAddress As String

Optional.  The server IP Address or Domain Name

ProxyPort As Integer

Optional.

ProxyType As Integer

Optional.  For a World Wide Web page, use INT_WWW (1) ; for an FTP file, use INT_FTP (2)

Return values

None.

Usage

Use this method to save files as a given file type to an Internet server.


Freelance Graphics: SaveAsToNotes method

 See list of classes

Available only in Freelance Graphics 97.

Saves the document as a Notes attachment.

Syntax

DocumentObject.SaveAsToNotes(AttachedFileName, UniversalNotesID, FieldName, DatabasePath, ServerName, DocType, Password)

Parameters

AttachedFileName As String

Optional. For example: "test.123", if omitted the interactive dialog will appear to prompt the user.

UniversalNotesID As String

Optional. For example: "150DFE45F1089B790065828D852562CA"

FieldName As String

Optional. For example: "Body"

DatabasePath As String

Optional. For example: "Databases\Docs in Progress.nsf"

ServerName As String

Optional. For example: "Local"

DocType As String

Optional (Freelance Graphics ignores this parameter). For example: ".PRZ"

Password As String

Optional (Freelance Graphics ignores this parameter). The document password.

Return values

None.

Usage

Use this method to save presentations to a Notes server.


Freelance Graphics: SaveAs method

 See list of classes

Save the current presentation in a new file.

Syntax

documentobject.SaveAs(filename, location, type, backup)

Parameters

filename as String

 Optional file name.

location as Variant

 Optional path in which to save the file.

type as String

(Optional) File type is ignored for this release. The actual type is always PRZ.

backup as Integer

 Indicates if the file should be backed up.

Value	Description
TRUE (-1)	Back up the file
FALSE (0)	Do not back up the file
Return values

None


Freelance Graphics: Save method

 See list of classes

Save the current presentation.

Syntax

documentobject.Save

Parameters

None

Return values

None


Freelance Graphics: SelectPageForCopy method

 See list of classes

Select for copying the specified page of a presentation opened with the OpenPresForCopy method.

Syntax

documentobject.SelectPageForCopy(pagenumber)

Parameters

pagenumber as Integer

The number of the page to select for copying.

Return values

None


Freelance Graphics: Select method

 See list of classes

Select the specified document, page, or object.

Syntax

selectionclasstype.Select(object)

Parameters

object as objecttype

 A Document, DrawObject, or Page object.

Return values

None

Examples

Selection.Select MyRect


Freelance Graphics: SetInternetOptions method

 See list of classes

Available only in Freelance Graphics 97.

This method opens the Internet Options dialog box. The user can select any options within the dialog box and then press OK.

Syntax

ApplicationObject.SetInternetOptions

Parameters

None.

Return values

None.

Usage

Use this method to connect to a different host or to connect to a host.


Freelance Graphics: SetObjectData method

 See list of classes

Set user-defined object data (persistent, string-valued name and value pair).

Syntax

drawobject.SetObjectData(variablename, variablevalue)

Parameters

variablename as String

The name for the variable.

variablevalue as String

The value for the variable.

Return values

None


Freelance Graphics: SetViewMode method

 See list of classes

Set the view mode.

Syntax

documentobject.SetViewMode(mode, pagenumber)

Parameters

mode as Variant

Value	Description
$ViewDraw	Draw view
$ViewOutliner	Outliner view
$ViewSorter	Page Sorter view
$ViewSlideShow	Screen Show view
pagenumber as Integer

Page number to view.

Return values

None


Freelance Graphics: Show method

 See list of classes

Makes the specified document the active document.

Syntax

documentobject.Show

Parameters

None

Return values

None

Usage

If you are working with multiple documents, use this command to switch between them.

Example

' Make two new documents, name them, then use the Show property
' to make first one and then the other document the active document,
' also print the name of the active document in each case.
Set doc1 = CurrentApplication.NewDocument
doc1.SaveAs "Logo1"
Set doc2 = CurrentApplication.NewDocument
doc2.SaveAs "PR_Imag"
doc1.Show
Print CurrentDocument.Name
doc2.Show
Print CurrentDocument.Name


Freelance Graphics: StartGuidedTemplate method

 See list of classes

Start using a content topic.

Syntax

documentobject.StartGuidedTemplate(TemplateName)

Parameters

TemplateName As String

Return values

None


Freelance Graphics: StopGuidedTemplate method

 See list of classes

Stop using a content topic.

Syntax

documentobject.StopGuidedTemplate

Parameters

None

Return values

None


Freelance Graphics: StopPlay method

 See list of classes

Stop playing the media.

Syntax

mediaobject.StopPlay

Parameters

None

Return values

None


Freelance Graphics: Stretch method

 See list of classes

Stretch the object.

Syntax

drawobject.Stretch(xanchor, yanchor, xstart, ystart, xfinish, yfinish, sretchmode)

Parameters

All x and y specifications are twips.

xanchor as Long

Horizontal coordinate of the point from which the object will be stretched.

yanchor as Long

Vertical coordinate of the point from which the object will be stretched.

xstart as Long

 Horizontal starting coordinate of the stretch vector.

ystart as Long

 Vertical starting coordinate of the stretch vector.

xfinish as Long

 Horizontal ending coordinate of the stretch vector.

yfinish as Long

 Vertical ending coordinate of the stretch vector.

stretchmode as Integer

Must be zero.

Return values

None


Freelance Graphics: Tile method

 See list of classes

Tiles all document windows within the Freelance Graphics application window.

Syntax

windowobject.Tile

Parameters

None

Return values

None

Examples

CurrentApplicationWindow.Tile


Freelance Graphics: Ungroup method

 See list of classes

Ungroup a grouped object.

Syntax

drawobject.Ungroup

Parameters

None

Return values

None

Examples

Dim MySel as Selection
Set MySel = CurrentSelection
MySel.Group
MySel.Move(50,50)
MySel.Ungroup


Freelance Graphics: ActiveDocument property

 See list of classes

(Read-only) Get the active presentation document.

Data type

Document

Syntax

set documentobject = applicationobject.ActiveDocument

Legal values

Any instance of the Document class.


Freelance Graphics: ActiveDocWindow property

 See list of classes

(Read-only) Get the document window of the active presentation.

Data type

DocWindow

Syntax

set documentwindow = applicationobject.ActiveDocWindow

Legal values

Any instance of the DocWindow class.


Freelance Graphics: ActivePage property

 See list of classes

(Read-write) Get or set the current page, or if in Page Sorter view, the selected page.

Data type

Page

Syntax

set page = documentobject.ActivePage

set documentobject.ActivePage = page

Legal values

Any instance of the Page class.


Freelance Graphics: Active property

 See list of classes

(Read-only) Determine if the document is the active presentation.

Data type

Integer (Boolean)

Syntax

value = documentobject.Active

Legal values

Value	Description
TRUE (non-0)	Document is the active presentation
FALSE (0)	Document is not the active presentation


Freelance Graphics: ApplicationWindow property

 See list of classes

(Read-only) Get the Freelance Graphics application window.

Data type

ApplicationWindow

Syntax

set applicationwindow = applicationobject.ApplicationWindow

Legal values

Any instance of the ApplicationWindow class.


Freelance Graphics: Application property

 See list of classes

(Read-only) Get the application.

Data type

Application

Document

String

Syntax

set object = objecttype.Application

Legal values

Any instance of the Application or Document class; for the BaseObject class, returns "CurrentApplication."


Freelance Graphics: Author property

 See list of classes

(Read-write) Get or set the author of the presentation.

Data type

String

Syntax

authorname = documentobject.Author

documentobject.Author = authorname

Legal values

Any string value.


Freelance Graphics: AutoSaveInterval property

 See list of classes

(Read-write) Get or set the number of minutes between automatic saves.

Note	Used only if AutoSave property is TRUE (non-0).

Data type

Integer

Syntax

autosaveinterval = preferencesobject.AutoSaveInterval

preferencesobject.AutoSaveInterval = autosaveinterval

Legal values

Any integer.

Examples

CurrentApplication.Preferences.AutoSaveInterval = 5


Freelance Graphics: AutoSave property

 See list of classes

(Read-write) Get or set the Automatic save preference.

Data type

Integer (Boolean)

Syntax

flag = preferencesobject.Autosave

preferencesobject.Autosave= flag

Legal values

Value	Description
TRUE (non-0)	Perform automatic saves
FALSE (0)	Do not perform automatic saves
Usage

The time interval for automatic saves is stored in the AutoSaveInterval property.

Examples

CurrentApplication.Preferences.AutoSave = True


Freelance Graphics: AutoTime property

 See list of classes

(Read-write) During a screen show, controls whether the page displays for the time interval specified in the pageobject.Delay property.

Data type

Integer (Boolean)

Syntax

value = pageobject.AutoTime

pageobject.AutoTime = value

Legal values

Value	Description
TRUE (non-0)	Page displays for the default time interval specified in pageobject.Delay
FALSE (0)	Page remains displayed until the user selects another page


Freelance Graphics: BackColor property

 See list of classes

(Read-write) Get or set the background color of a drawn object.

Data type

Color

Syntax

set color = backgroundobject.BackColor

set backgroundobject.BackColor = color

Legal values

Any instance of the Color class.

Examples

Dim MyColor as Color
Set MyColor = MyRect1.Background.BackColor
Set MyRect2.Background.BackColor = MyColor


Freelance Graphics: Background property

 See list of classes

(Read-write) Get or set the Background property of the object.

Data type

Background

Syntax

set background = drawobject.Background

set drawobject.Background = background

Legal values

Any instance of the Background class.

Usage

You can set a Background to an existing Background, or you can set the individual properties (BackColor, Color, and Pattern) of the Background class.

Examples

Dim MyBackgroundStyle as Background
Set MyBackgroundStyle = MyRect.Background
Set MyOval.Background = MyBackgroundStyle


Freelance Graphics: BackupDir property

 See list of classes

(Read-write) Get or set the backup directory preference.

Data type

String

Syntax

backupdirectory = preferencesobject.BackupDir

preferencesobject.BackupDir = backupdirectory

Legal values

Any directory.

Examples

CurrentApplication.Preferences.BackUpDir = "c:\backup"


Freelance Graphics: BlackWhitePal property

 See list of classes

(Read-write) Get or set the Black-and-white or Color palette flag.

Data type

Integer (Boolean)

Syntax

flag = preferencesobject.BlackWhitePal

preferencesobject.BlackWhitePal = flag

Legal values

Value	Description
TRUE (non-0)	Enable black-and-white palette
FALSE (0)	Disable black-and-white palette
Examples

CurrentApplication.Preferences.BlackWhitePal = True


Freelance Graphics: Blue property

 See list of classes

(Read-only) Get the amount of blue in a Color object.

Data type

Integer

Syntax

blueamount = colorobject.Blue

Legal values

0 (no blue) to 255 (maximum blue).

Examples

Dim AmountOfBlue as Integer
AmountOfBlue = MyRect.Background.Color.Blue


Freelance Graphics: Bold property

 See list of classes

(Read-write) Determine if the font is bold.

Data type

Integer (Boolean)

Syntax

value = fontobject.Bold

fontobject.Bold = value

Legal values

Value	Description
TRUE (non-0)	Bold
FALSE (0)	Not bold
Examples

MyText.TextBlock.Font.Bold = True


Freelance Graphics: BorderDisplay property

 See list of classes

(Read-write)  Get or set the border display preference.

Data type

Integer (Variant)

Syntax

borderdisplay = preferencesobject.BorderDisplay

preferencesobject.BorderDisplay= borderdisplay

Legal values

Value	Description
$BorderDispMargin	Display drawing area border (recommended)
$BorderDispPrintableArea	Display printable area border
$BorderDispNone	Display no border
Examples

CurrentApplication.Preferences.BorderDisplay = $BorderDispPrintableArea


Freelance Graphics: Border property

 See list of classes

(Read-write) Get or set the Border style for a drawing object.

Data type

Border

Syntax

set border = drawobject.Border

set drawobject.Border = border

Legal values

Any instance of the Border class.

Usage

You can set a Border to an existing Border, but more commonly you will set the individual properties (Color, Pattern, and Width) of the Border class.

Examples

Set MyRect2.Border = MyRect1.Border

or

MyRect1.Border.Width = $ltsBorderWidthThin


Freelance Graphics: BuildBullets property

 See list of classes

(Read-write) Determines if a text block is to be made into a bullet build during a screen show.

Data type

Integer (Boolean)

Syntax

value = drawobject.Buildbullets

drawobject.BuildBullets = value

Legal values

Value	Description
TRUE (non-0)	Make text block into a bullet build during a screen show
FALSE (0)	Do not make text block into a bullet build during a screen show


Freelance Graphics: BulletProperties property

 See list of classes

(Read-only) Get the bullet properties for a text block.

DataType

BulletProperties

Syntax

set bulletproperties = textblockobject.BulletProperties

Legal values

Any instance of the BulletProperties class.

Usage

You can access or set the individual properties (Color, ShadowColor, ShadowDepth, and so on) of the BulletProperties class.


Freelance Graphics: Case property

 See list of classes

(Read-write) Determine the font case (upper or lower).

Note	This property is ignored by Freelance Graphics, and is provided for compatibility with other Lotus products.

Data type

Integer

Syntax

fontcase = fontobject.Case

fontobject.Case= fontcase

Legal values

Any integer (always returns zero).


Freelance Graphics: Changed property

 See list of classes

(Read-write) Determine if the document has changed.

Data type

Integer (Boolean)

Syntax

value = documentobject.Changed

documentobject.Changed = value

Legal values

Value	Description
TRUE (non-0)	Document changed
FALSE (0)	Document has not been changed


Freelance Graphics: Chart property

 See list of classes

(Read-only) Get the Chart property for a drawing object.

Note	The Freelance Graphics Chart class is derived from the DrawObject class, and has all the properties and methods of the LotusChart ChartBase class. For more information about the LotusChart ChartBase class, see the Help contents under LotusScript, LotusChart LotusScript Reference, By Category, Classes.

Data type

Chart

Syntax

set chart = drawobject.Chart

Legal values

Any instance of the Chart class.


Freelance Graphics: CodePage property

 See list of classes

(Read-write) Get or set the code page preference.

Data type

Integer

Syntax

codepage = preferencesobject.CodePage

preferencesobject.Author = codepage

Legal values

Value	Description
0	System setting
437	U.S. English
850	Multilingual (Latin I)
852	Slavic (Latin II)
860	Portuguese
863	Canadian French
865	Norwegian


Freelance Graphics: ColCount property

 See list of classes

(Read-only) Get the number of columns in a table.

Data type

Integer

Syntax

columns = tableobject.ColCount

Legal values

Any positive integer.


Freelance Graphics: Colors property

 See list of classes

(Read-only) Get the color palette for an application.

Data type

Colors

Syntax

set colorpalette = colorsobject.Colors

Legal values

Any instance of the Colors class.

Usage

You can use this property to retrieve palettecolors using the RGBToColor, Item, and GetNearestColor methods.

Examples

Dim MyPeachColor as Color
Set MyPeachColor = CurrentApplication.Colors.Item(178)
Set MyPeachColor = CurrentApplication.Colors.Item("peach")
Set MyPeachColor = CurrentApplication.Colors.RGBToColor(16764301)


Freelance Graphics: Color property

 See list of classes

(Read-write) Get or set the color for a background, border, bullet, or line style.

Data type

Color

Syntax

set color = object.Color

set object.Color = color

Legal values

Any instance of the Color class.

Usage

You can set a Color to an existing Color, or you can use the RGBtoColor method to create a new Color from a combination of red, green, and blue. However, once you define a Color object in Freelance Graphics, you cannot modify its Red, Green, or Blue properties individually.

Examples

Dim MyColor as Color
Set MyColor = MyLine.LineStyle.Color
Set MyRect.Background.Color = MyColor


Freelance Graphics: Count property

 See list of classes

(Read-only) Get the number of open presentations, the number of objects in a collection, the number of colors in the palette, or the number of pages in a collection.

Data type

Integer

Syntax

count = object.Count

Legal values

Any integer.

Examples

Print "There are " + str$(CurrentDocument.Pages.Count) + " pages in this document."

or

Dim NumObjs as Integer
NumObjs = CurrentPage.Objects.Count


Freelance Graphics: CurrentPrinter property

 See list of classes

(Read-only) Get the name of the current printer for an application.

Data type

String

Syntax

printername = applicationobject.CurrentPrinter

Legal values

Any printer name.


Freelance Graphics: DefaultFilePath property

 See list of classes

(Read-only) Get the application's default file path.

Data type

String

Syntax

defaultfilepath = applicationobject.DefaultFilePath

Legal values

Any file path.

Examples

Print "The default file path is " + CurrentApplication.DefaultFilePath


Freelance Graphics: Delay property

 See list of classes

(Read-write) Get or set the time delay (in seconds) for a drawing object or page transition during a screen show. For a page, this delay is used only when pageobject.AutoTime is TRUE (non-0).

Data type

Integer

Syntax

secondsdelay = object.Delay

object .Delay = secondsdelay

Legal values

Any positive integer.


Freelance Graphics: Description property

 See list of classes

(Read-write) Get or set the description of the presentation stored in the document, or get the class name of an object.

Data type

String

Syntax

documentobject.Description = description

description = documentobject.Description

Legal values

Any string value.


Freelance Graphics: DimPrevious property

 See list of classes

(Read-write) Determines if the previous items in a bulleted list are to be dimmed during a bullet build (during a screen show).

Data type

Integer (Boolean)

Syntax

value = drawobject.DimPrevious

drawobject.DimPrevious = value

Legal values

Value	Description
TRUE (non-0)	Dim the previous bullets
FALSE (0)	Do not dim the previous bullets


Freelance Graphics: DisplayCoords property

 See list of classes

(Read-write) Get or set the Display coordinates preference.

Data type

Integer (Boolean)

Syntax

displaycoordinates = preferencesobject.DisplayCoords

preferencesobject.DisplayCoords = displaycoordinates

Legal values

Value	Description
TRUE (non-0)	Display the coordinates
FALSE (0)	Do not display the coordinates
Examples

CurrentApplication.Preferences.DisplayCoords = True


Freelance Graphics: DisplayDrawRuler property

 See list of classes

(Read-write) Get or set the Display drawing ruler preference.

Data type

Integer (Boolean)

Syntax

flag = preferencesobject.DisplayDrawRuler

preferencesobject.DisplayDrawRuler = flag

Legal values

Value	Description
TRUE (non-0)	Display the drawing ruler
FALSE (0)	Do not display the drawing ruler
Examples

CurrentApplication.Preferences.DisplayDrawRuler = True


Freelance Graphics: DisplayGrid property

 See list of classes

(Read-write) Get or set the Display grid preference.

Data type

Integer (Boolean)

Syntax

flag = preferencesobject.DisplayGrid

preferencesobject.DisplayGrid = flag

Legal values

Value	Description
TRUE (non-0)	Display grid
FALSE (0)	Do not display grid
Examples

CurrentApplication.Preferences.DisplayGrid = True


Freelance Graphics: DisplayTextRuler property

 See list of classes

(Read-write) Get or set the Display text ruler preference.

Data type

Integer (Boolean)

Syntax

flag = preferencesobject.DisplayTextRuler

preferencesobject.DisplayTextRuler = flag

Legal values

Value	Description
TRUE (non-0)	Display text ruler
FALSE (0)	Do not display text ruler
Examples

CurrentApplication.Preferences.DisplayTextRuler = True


Freelance Graphics: DocName property

 See list of classes

(Read-only) Get the document (file) name for the presentation.

Data type

String

Syntax

documentname = documentobject.DocName

Legal values

Any string value.


Freelance Graphics: Documents property

 See list of classes

(Read-only) Get the collection of open presentations.

Data type

Documents

Syntax

set documentcollection = applicationobject.Documents

Legal values

Any instance of the Documents class (a collection of Document objects).

Examples

ForAll doc in CurrentApplication.Documents
Print doc.DocName
End ForAll

or

Dim num as Integer
num = CurrentApplication.Documents.Count
Print "There are " + str$(num) + " presentations open."


Freelance Graphics: Document property

 See list of classes

(Read-only) Get the document containing the page.

Data type

Document

Syntax

set documentobject = pageobject.Document

Legal values

Any instance of the Document class.

Usage

You can set a Document object to an existing Document, or you can set the individual properties (Author, Description, Location, and so on) of the Document class.


Freelance Graphics: DocWindow property

 See list of classes

(Read-only) Get the document window size (width and height).

Data type

DocWindow

Syntax

set documentwindow = documentobject.DocWindow

Legal values

Any instance of the DocWindow class.

Usage

Use this property to get the width and height of the document window.


Freelance Graphics: DoubleUnderline property

 See list of classes

(Read-write) Determine the Double underline (two lines under both words and spaces) font property.

Note	This property is ignored by Freelance Graphics, and is provided for compatibility with other Lotus products.

Data type

Integer (Boolean)

Syntax

flag = fontobject.DoubleUnderline

fontobject.DoubleUnderline = flag

Legal values

Value	Description
TRUE (non-0)	Double underline
FALSE (0)	No double underline


Freelance Graphics: Embedded property

 See list of classes

(Read-only) Determine if the object is embedded.

Data type

Integer (Boolean)

Syntax

flag = documentobject.Embedded

Legal values

Value	Description
TRUE (non-0)	Embedded object
FALSE (0)	Not an embedded object


Freelance Graphics: Exclude property

 See list of classes

(Read-write) Determine if the page is excluded from the screen show.

Data type

Integer (Boolean)

Syntax

value = pageobject.Exclude

pageobject.Exclude = value

Legal values

Value	Description
TRUE (non-0)	Excluded from screen show
FALSE (0)	Not excluded from screen show


Freelance Graphics: ExeName property

 See list of classes

(Read-write) Determine the executable to launch from an object during a screen show.

Data type

String

Syntax

executablename = drawobject.ExeName

drawobject.ExeName = executablename

Legal values

Any legal executable name.


Freelance Graphics: FirstIndent property

 See list of classes

(Read-write) Get or set the First indent property for the text (the number of twips the first line of text is to be indented).

Data type

Integer

Syntax

indentation = textobject.FirstIndent

textobject.FirstIndent = indentation

Legal values

Any integer.

Usage

Use the ParaIndent property to set the amount of space you want each paragraph indented.


Freelance Graphics: FontColor property

 See list of classes

(Read-write) Determine the color for a font.

Data type

Color

Syntax

set color = fontobject.FontColor

set fontobject.Color = color

Legal values

Any instance of the Color class.

Usage

You can set a FontColor to an existing Color, or you can use the Colors class to set a FontColor to a Color from the Freelance Graphics palette.

Examples

Set MyTextObject1.TextBlock.Font.FontColor = MyColor
Set MyTextObject2.TextBlock.Font.FontColor = CurrentApplication.Colors.Item(178)


Freelance Graphics: FontName property

 See list of classes

(Read-write) Determine the Font name for a Font class.

Data type

String

Syntax

fontname = fontobject.FontName

fontobject.FontName = fontname

Legal values

Any valid font name.

Examples

MyTextObject.TextBlock.Font.FontName = "Arial"


Freelance Graphics: FontUnit property

 See list of classes

(Read-write) Determine the font units of measurement for an application. For Freelance Graphics, this is always points.

Data type

Variant

Syntax

fontunit = applicationobject.FontUnit

applicationobject.FontUnit = fontunit

Legal values

The only legal value is $ltsScaleModePoint.


Freelance Graphics: Font property

 See list of classes

(Read-write) Determine the font property for the TextProperties or TextBlock class.

Data type

Font

Syntax

set font = object.Font

set object.Font = font

Legal values

Any instance of the Font class.

Usage

You can set a Font to an existing Font, or you can set the individual properties (Bold, Case, FontColor, and so on) of the Font class.

Examples

Dim MyFont as Font
Set MyFont = MyTextObject.TextBlock.Font
MyFont.Bold = True
Set MyTextObject2.TextBlock.Font = MyFont


Freelance Graphics: FullName property

 See list of classes

(Read-only) Get the full application or document path name (the full path name includes the executable file name).

Data type

String

Syntax

fullname = object.FullName

Legal values

Any valid full path name.


Freelance Graphics: Green property

 See list of classes

(Read-only) Get the amount of green in a Color object.

Data type

Integer

Syntax

greenamount = colorobject.Green

colorobject.Green= greenamount

Legal values

0 (no green) to 255 (maximum green).

Examples

Dim AmountOfGreen as Integer
AmountOfGreen = MyRect.Background.Color.Green


Freelance Graphics: Height property

 See list of classes

(Read-only) Get the application window, document window, or drawing object height, in twips.

Data type

Integer (AppWindow, DocWindow classes)

Long (DrawObject class)

Syntax

twipshigh = object.Height

Legal values

Any positive value.


Freelance Graphics: HorizontalAlignment property

 See list of classes

(Read-write) Get or set the horizontal alignment property for the text.

Data type

Variant (Enumerated)

Syntax

horizontalalignment = textobject.HorizontalAlignment

HorizontalAlignment = horizontalalignment

Legal values

Value	Description
$ltsAlignmentLeft	Left aligned
$ltsAlignmentRight	Right aligned
$ltsAlignmentHorizCenter	Centered horizontally
$ltsAlignmentJustify	Fit between margins


Freelance Graphics: ID property

 See list of classes

(Read-only) Get the ID for a "Click here..." block.

Data type

Integer

Syntax

idnumber = placementblockobject.ID

Legal values

Any "Click here..." block number.


Deleted: Freelance Graphics: Image property
Freelance Graphics: Image property

 See list of classes

(Read-only)Get the image properties for a drawing object. This property is valid only if DrawImageRef.IsImage is TRUE (non-0).

Data type

Image

Syntax

set image = drawobject.Image

Legal values

Any instance of the Image class.

Usage

You can set an Image to an existing Image, or you can set the individual properties (Brightness, Contrast, Sharpness, and so on) of the Image class.


Freelance Graphics: Interactive property

 See list of classes

(Read-only) Determine if the application is interactive. For Freelance Graphics, this value is always TRUE (non-0).

Data type

Integer (Boolean)

Syntax

value = applicationobject.Interactive

Legal values

Value	Description
TRUE (non-0)	Interactive
FALSE (0)	Not interactive


Freelance Graphics: IsChart property

 See list of classes

(Read-only) Determine if the object is a chart object.

Data type

Integer (Boolean)

Syntax

value = drawobject.IsChart

Legal values

Value	Description
TRUE (non-0)	Chart
FALSE (0)	Not a chart


Freelance Graphics: IsDraggable property

 See list of classes

(Read-only) Determine if the object is draggable.

Note	Not implemented for this release.

Data type

Integer (Boolean)

Syntax

value = object.IsDraggable

Legal values

Value	Description
TRUE (non-0)	Draggable
FALSE (0)	Not draggable


Freelance Graphics: IsGroup property

 See list of classes

(Read-only) Determine if the object is a grouped object.

Data type

Integer (Boolean)

Syntax

value = drawobject.IsGroup

Legal values

Value	Description
TRUE (non-0)	Grouped
FALSE (0)	Not grouped
Examples

If Selection.IsGroup Then
Print "Selected DrawObject is a Grouped object."
Selection.UnGroup

End If


Freelance Graphics: IsImage property

 See list of classes

(Read-only) Determine if the object is an image object (a bitmap or graphics metafile, for example).

Data type

Integer (Boolean)

Syntax

value = drawobject.IsImage

Legal values

Value	Description
TRUE (non-0)	Image
FALSE (0)	Not an image


Freelance Graphics: IsMedia property

 See list of classes

(Read-only) TRUE if object is a media object (a movie or sound, for example).

Data type

Integer (Boolean)

Syntax

value = drawobject.IsMedia

Legal values

Value	Description
TRUE (non-0)	Movie or sound object
FALSE (0)	Not a movie or sound object


Freelance Graphics: IsOleObj property

 See list of classes

(Read-only) Determine if the object is an OLE object.

Data type

Integer (Boolean)

Syntax

value = drawobject.IsOleObj

Legal values

Value	Description
TRUE (non-0)	OLE object
FALSE (0)	Not an OLE object


Freelance Graphics: IsOpen property

 See list of classes

(Read-only) Determine if the presentation document is currently open. In Freelance Graphics, this is always TRUE (non-0).

Data type

Integer (Boolean)

Syntax

value = documentobject.IsOpen

Legal values

Value	Description
TRUE (non-0)	Open
FALSE (0)	Not open


Freelance Graphics: IsPlacementBlock property

 See list of classes

(Read-only) Determine if the object is a "Click here..." block.

Data type

Integer (Boolean)

Syntax

value = drawobject.IsPlacementBlock

Legal values

Value	Description
TRUE (non-0)	"Click here..." block
FALSE (0)	Not a "Click here..." block


Freelance Graphics: IsSelectable property

 See list of classes

(Read-only) Determine if the object can be selected.

Data type

Integer (Boolean)

Syntax

value = object.IsSelectable

Legal values

Value	Description
TRUE (non-0)	Selectable (objects of the DrawObject and Page classes)
FALSE (0)	Not selectable (all other classes)


Freelance Graphics: IsTable property

 See list of classes

(Read-only) Determine if the object is a table object.

Data type

Integer (Boolean)

Syntax

value = drawobject.IsTable

Legal values

Value	Description
TRUE (non-0)	Table
FALSE (0)	Not a table


Freelance Graphics: IsText property

 See list of classes

(Read-only) Determine if the object is a text object

Data type

Integer (Boolean)

Syntax

value = drawobject.IsText

Legal values

Value	Description
TRUE (non-0)	Text object
FALSE (0)	Not a text object


Freelance Graphics: IsValid property

 See list of classes

(Read-only) Determine if the object is valid (still available).

Data type

Integer (Boolean)

Syntax

value = object.IsValid

Legal values

Value	Description
TRUE (non-0)	Valid
FALSE (0)	Not valid
Examples

The following example prints the value zero (FALSE):

MyRect.Cut
Print MyRect.IsValid


Freelance Graphics: Italic property

 See list of classes

(Read-write) Determine the italic attribute for the font.

Data type

Integer (Boolean)

Syntax

value = font.Italic

font.italic = value

Legal values

Value	Description
TRUE (non-0)	Italicized
FALSE (0)	Not italicized
Examples

MyTextObject.TextBlock.Font.Italic = True


Freelance Graphics: Layout property

 See list of classes

(Read-write) Determine the layout used by the page.

Data type

String

Syntax

layoutname = pageobject.Layout

pageobject.Layout = layoutname

Legal values

Any existing page layout name. Use a zero-length string ("") to refer to the [Blank Page] layout.

Tip	Use the Freelance Graphics user interface to display all page layout names.


Freelance Graphics: Left property

 See list of classes

(Read-only) Get the left edge of the object, in twips.

Data type

Long

Syntax

lefttwip = drawobject.Left

Legal values

Any positive value.


Freelance Graphics: LineLead property

 See list of classes

(Read-write) Get or set the line leading for the text (the number of points between line skips).

Data type

Integer

Syntax

lineleading = textobject.LineLead

textobject.LineLead= lineleading

Legal values

Any positive integer.


Freelance Graphics: LineStyle property

 See list of classes

(Read-write) Get or set the line style property.

Data type

LineStyle

Syntax

set linestyleobject = drawobject.LineStyle

set drawobject.LineStyle = linestyleobject

Legal values

You can set a LineStyle to an existing LineStyle, or you can set the individual properties (Color, Pattern, and Width) of the LineStyle class.

Examples

MyLine1.LineStyle.Width = $ltsBorderWidthThin
Set MyLine2.LineStyle = MyLine1.LineStyle


Freelance Graphics: Location property

 See list of classes

(Read-only) Get the application or document path.

Data type

String

Syntax

path = object.Location

Legal values

Any valid path name.


Freelance Graphics: Media property

 See list of classes

(Read-only) Get the Media class properties for an object. This property is valid only if drawobject.isMedia is TRUE (non-0).

Data type

Media

Syntax

set media = drawobject.Media

set drawobject.Media = media

Legal values

Any instance of the Media class.


Freelance Graphics: Name property

 See list of classes

(Read-write) Get or set the page or drawing object name; or get the name of any other type of Freelance Graphics object.

Note	Read-only except for the Page and DrawObject classes.

Data type

String

Syntax

name = object.Name

object.Name = name

Legal values

Any ASCII string value, but may not contain a semi-colon (;) or an equal sign (=).

Examples

Dim MyRect as DrawObject
Selection.name = "purple rectangle"
Set MyRect = CurrentPage.FindObject("purple rectangle")
CurrentPage.name = "My Title Page"
Print CurrentPage.Name


Freelance Graphics: Number property

 See list of classes

(Read-write) Get or set the page number.

Data type

Integer

Syntax

pagenumber = pageobject.Number

pageobject.Number = pagenumber

Legal values

From 1 to the number of pages in the presentation.

Usage

To move a page, set the page number to the new page number.


Freelance Graphics: Objects property

 See list of classes

(Read-only) Get a collection of drawing objects on a page.

Data type

ObjectCollection

Syntax

set objectcollection = pageobject.Objects

Legal values

Any collection of objects.

Examples

ForAll objs in CurrentPage.Objects
Print objs.name
End ForAll

Dim MyPage as Page
Dim num as Integer
num = MyPage2.Objects.Count
Print "There are " + str$(num) + " objects on page 2."


Freelance Graphics: Object property

 See list of classes

Available only in Freelance Graphics 97.

(Read only) Returns the embedded OLE object's automation interface.

Data type

Variant.

Syntax

set MyOLE = OLEObject.Object

Usage

This property returns the embedded object's native automation interface, so that you can access its methods, properties, and so on.

Example

' This example uses the Lotus Draw Component as an OLE object.
Dim DrawOCX As DrawObject
Dim OCXAuto As Variant

' When an OLE object is on the page, Freelance Graphics assigns a name to the object;
' in this example, the name is Lotus Draw/Diagram Component1.
' Brackets are shorthand notation in LotusScript for the object with the specified name on the current
' page. In this script the object variable, DrawOCX, is set to the Lotus Draw Component on the
' current page.
Set DrawOCX = [Lotus Draw/Diagram Component1]

' Get the OCX's automation interface.
Set OCXAuto = DrawOCX.Object

' Then use interface to access the OCX's scripting language
OCXAuto.CreateSymbol "C:\lotus\Smasters\FLG\Animals.sym" , 1


Freelance Graphics: OffsetReplicate property

 See list of classes

(Read-write) Get or set the Offset replicate preference.

Data type

Integer (Boolean)

Syntax

flag = preferencesobject.OffsetReplicate

preferencesobject.OffsetReplicate = flag

Legal values

Value	Description
TRUE (non-0)	Offset copy from original
FALSE (0)	Place copy on top of original
Examples

CurrentApplication.Preferences.OffsetReplicate = True


Freelance Graphics: OleObj property
Freelance Graphics: OleObject property

 See list of classes

(Read-only) Get an OLE object.

Data type

Variant

Syntax

set object = drawobject.OleObject

Legal values

As defined by the application that created the object.


Freelance Graphics: Overstrike property

 See list of classes

(Read-write) Determine the overstrike attribute for the font. The overstrike characters are typed over existing characters, usually indicating a deletion.

Note	This property is ignored by Freelance Graphics, and is provided for compatibility with other Lotus products.

Data type

Integer (Boolean)

Syntax

value = FontRef.Overstrike

FontRef.Overstrike = value

Legal values

Value	Description
TRUE (non-0)	Overstrike on
FALSE (0)	Overstrike off


Freelance Graphics: PageSelection property

 See list of classes

(Read-only) Get the set of pages currently selected in an application or document.

Data type

PageSelection

Syntax

set pageselection = object.PageSelection

Legal values

Any page selection.


Freelance Graphics: Pages property

 See list of classes

(Read-only) Get pages in the presentation document.

Data type

PageCollection

Syntax

set pagecollection = documentobject.Pages

Legal values

Any collection of pages in the document.

Examples

ForAll page in CurrentDocument.Pages
Print page.name
End ForAll
Dim num as Integer
num = MyDocument.Pages.Count
Print "There are " + str$(num) + " pages in MyDocument."


Freelance Graphics: PageTransitionDelay property

 See list of classes

(Read-write) Get or set the default delay for each page in the presentation when running a screen show.

Data type

Integer

Syntax

secondsdelay = documentobject.PageTransitionDelay

documentobject.PageTransitionDelay = secondsdelay

Legal values

Any positive integer.


Freelance Graphics: PageTransitionEffect property

 See list of classes

(Read-write) Get or set the screen show page transition effect for each page in the presentation.

Data type

Variant

Syntax

pagetransitioneffect = documentobject.PageTransitionEffect

documentobject.PageTransitionEffect = pagetransitioneffect

Legal values

Value	Description
$SSPageReplace	Instant replacement
$SSPageBottom	From bottom
$SSPageLeft	From left
$SSPageRight	From right
$SSPageBlinds	Blinds opening
$SSPageLouvers	Louvers opening
$SSPageBlocks	Block replacement
$SSPageCenter	From center out
$SSPageBoxIn	From outer box in
$SSPageZigZag	Zigzag replacement
$SSPageHorzln	Horizontal lines
$SSPageHVertln	Vertical lines
$SSPageTop	From top
$SSPageBoxOut	From inner box out
$SSPageHorizOut	Slide out horizontally
$SSPageVertOut	Slide out vertically
$SSPageFade	Fade to new
$SSPageDiagL	Diagonal left
$SSPageDiagR	Diagonal right
$SSPagePanL	Pan left
$SSPagePanR	Pan right
$SSPageScrollT	Scroll from the top
$SSPageScrollB	Scroll from the bottom
$SSPageDraw	Draw new page
$SSPageRain	Rain new page
$SSPagePBrush	Paintbrush new page
$SSPageShade	Shade new page
$SSPageCurtain	Open curtain
$SSPageBMPCol	Bitmap by colors


Freelance Graphics: Page property

 See list of classes

(Read-only) Get the page on which the drawing object exists.

Data type

Page

Syntax

set pageobject = drawobject.Page

Legal values

Any instance of the Page class.


Freelance Graphics: ParaIndent property

 See list of classes

(Read-write) Get or set the Paragraph indent property for the text (the number of twips to indent the paragraph).

Data type

Integer

Syntax

indentation = textobject.ParaIndent

textobject.ParaIndent = indentation

Legal values

Any integer.

Usage

Use the FirstIndent property to set the amount of space you want first line of the paragraph indented.


Freelance Graphics: Paralead property

 See list of classes

(Read-Write) Defines the spacing between paragraphs in a textblock as a percentage of a single-spaced line.

Data type

Integer

Syntax

value = textpropertyobject.Paralead

textpropertyobject.Paralead = value

Legal values

Percentage of a single-space line. For example, 100 indicates double-space, 0 indicates single space, and 50 indicates single spacing plus a half a space, that is, a space and a half. Legal values are from 0 to 900.

Usage

This property does in script what the user interface provides in the Paragraph value of the "Space between Lines, Paragraphs" area of the infobox when a text block is selected (but not being edited). The values for the parameter are related to those shown in the infobox by the formula: Infoboxvalue = (Paralead + 100) /  100.


Freelance Graphics: Parent property

 See list of classes

(Read-only) Identify the parent application from which the current application or document was launched; or return the string "CurrentApplication" if the object is not a member of the Application or Document class.

Data type

Application

Document

Syntax

set parent = object.Parent

Legal values

Any instance of the Application or Document class, or the string "CurrentApplication."


Freelance Graphics: Path property

 See list of classes

(Read-only) Get the path of the application or document.

Data type

String

Syntax

path = applicationobject.Path

Legal values

Any legal path.


Freelance Graphics: Pattern property

 See list of classes

(Read-write) Get or set a background, border, or line style pattern.

Data type

Variant

Syntax

pattern = object.Pattern

object.Pattern = pattern

Legal values

There are separate values for each class. You can view the patterns in the Properties box of the Freelance Graphics user interface for the appropriate object type, and match them with the names below.

Border class

Value	Description
$ltsBorderPatternNone
$ltsBorderPatternSolid
$ltsBorderPatternDashDot
$ltsBorderPatternDashDotDot
$ltsBorderPatternLongDash
$ltsBorderPatternDashed	same as $ltsBorderPatternDot
$ltsBorderPatternDot	same as $ltsBorderPatternDashed
LineStyle class

Value	Description
$ltsLineStyleNone
$ltsLineStyleSolid
$ltsLineStyleDashDot
$ltsLineStyleDashDotDot
$ltsLineStyleLongDash
$ltsLineStyleMediumDash	same as $ltsLineStyleDot
$ltsLineStyleDot	same as $ltsLineStyleMediumDash
Background values

Value	Description
$ltsFillNone
$ltsFillSolid
$ltsFillGray1
$ltsFillGray2
$ltsFillGray3
$ltsFillGray4
$ltsFillGray5
$ltsFillGray6
$ltsFillGray7
$ltsFillGray8
$ltsFillGray9	same as $ltsFillGray10
$ltsFillGray10	same as $ltsFillGray9
$ltsFillLeftDiagonal
$ltsFillRightDiagonal
$ltsFillDiagonalHatch
$ltsFillHorizontal
$ltsFillVertical
$ltsFillRegularHatch
$ltsFillLeftRightGrad
$ltsFillBottomTopGrad
$ltsFillNeToSwGrad
$ltsFillNwToSeGrad
$ltsFillCenterBoxGrad
$ltsFillLowBoxGrad
$ltsFillCenterCircleGrad
$ltsFillLowCircleGrad
$ltsFillNeToSwDiagonalStripGrad
$ltsFillNwToSeDiagonalStripGrad
Examples

MyRect.Border.Pattern = $ltsBorderPatternDashed
MyRect.Background.Pattern = $ltsFillGray8
MyLine.LineStyle.Pattern = $ltsLineStyleDashDot


Freelance Graphics: PlacementBlock property

 See list of classes

(Read-only) Get the "Click here..." block properties for a drawing object. These properties are valid only when drawobject.isPlacementBlock is TRUE (non-0).

Data type

PlacementBlock

Syntax

set placementblock = placementblockobject.PlacementBlock

Legal values

Any instance of the PlacementBlock class.


Freelance Graphics: PlayPriority property

 See list of classes

(Read-write) Get or set the priority with which the object transitions onto the page during a screen show.

Data type

Integer

Syntax

playpriority = drawobject.PlayPriority

drawobject.PlayPriority = playpriority

Legal values

1=first object, 2=second, and so on


Freelance Graphics: Preferences property

 See list of classes

(Read-write) Get or set the preferences for the application.

Data type

Preferences

Syntax

set preferences = applicationobject.Preferences

set applicationobject.Preferences.individualproperty = preference

Legal values

Any instance of the Preferences class.

Usage

You can get the set of preferences in a Preferences object, or you can get or set the individual properties (AutoSave, AutoSaveInterval, BackupDir, and so on) of the Preferences class.

Examples

CurrentApplication.Preferences.AutoSave = True


Freelance Graphics: Priority property

 See list of classes

(Read-write) Get or set the drawing priority of a drawing object.

Note	You can set the priority of a DrawObject that is a placement block only if you are editing a .MAS or .SMC file, otherwise it is read only.

Data type

Integer

Syntax

priority  = drawobject.Priority

drawobject.Priority = priority

Legal values

1=first, 2=second, and so on

Usage

If there are empty placement blocks on the page, they are alway lowest in priority (that is, a priority of one), so that an empty placement block is always behind another drawing object. If you try to put something other than an empty placement block at a priority equal to or lower than the placement block's priority, then you get a message explaining that it cannot be done.

Note	Also, the priority of a DrawObject of any kind can never be set higher than the total number of DrawObjects on the page. Also a DrawObject, other than a PlacementBlock, can not be lower in priority than a PlacementBlock.


Freelance Graphics: PromptText property

 See list of classes

(Read-write) Get or set the prompt text for a "Click here..." block.

Data type

String

Syntax

prompttext = placementblockobject.PromptText

placementblockobject.PromptText = prompttext

Legal values

Any string value.


Freelance Graphics: ReadOnly property

 See list of classes

(Read-only) Determine if the presentation is read-only.

Data type

Integer (Boolean)

Syntax

value  = documentobject.ReadOnly

Legal values

Value	Description
TRUE (non-0)	Read-only
FALSE (0)	Read-write


Freelance Graphics: Red property

 See list of classes

(Read-only) Get the amount of red in a Color object.

Data type

Integer

Syntax

redamount = colorobject.Red

Legal values

0 (no red) to 255 (maximum red).

Examples

Dim AmountOfRed as Integer
AmountOfRed = MyRect.Background.Color.Red


Freelance Graphics: RemoveMedia property

 See list of classes

(Read-only) Determine if the object is on removable media.

Data type

Integer (Boolean)

Syntax

removablemedia = drawobject.RemoveMedia

Legal values

Value	Description
TRUE (non-0)	On removable media
FALSE (0)	Not on removable media


Freelance Graphics: RightIndent property

 See list of classes

(Read-write) Get or set the Right indent property for the text (the number of twips to indent the text).

Data type

Integer

Syntax

indentation = textobject.RightIndent

textobject.RightIndent = indentation

Legal values

Any integer.


Freelance Graphics: RowCount property

 See list of classes

(Read-only) Get the number of rows in a table.

Data type

Integer

Syntax

rows = tableobject.RowCount

Legal values

Any positive integer.


Freelance Graphics: ScanSpeed property

 See list of classes

(Read-write) Get or set the Scan speed preference (the number of seconds delay between displaying images when scanning in the browser).

Data type

Long

Syntax

secondsdelay = preferencesobject.ScanSpeed

preferencesobject.ScanSpeed = secondsdelay

Legal values

Any value between .1 and 100.0.

Examples

CurrentApplication.Preferences.ScanSpeed = 36.5


Freelance Graphics: SelectedObjects property

 See list of classes

(Read-write) Get or set the collection of currently selected objects.

Data type

Objects

Syntax

set selection = objectsobject.SelectedObjects

set objectsobject.SelectedObjects = selection

Legal values

Any selection of objects.

Usage

This property is useful for saving and then restoring a selection.

Examples

Dim MySelection as Objects 'clears and restores selection
Set MySelection = Selection.SelectedObjects
Selection.ClearSelection
Set Selection.SelectedObjects = MySelection


Freelance Graphics: SelectionCount property

 See list of classes

(Read-only) Get the number of selected pages or objects.

Data type

Integer

Syntax

selectioncount = object.SelectionCount

Legal values

Any integer.

Examples

Dim num as Integer
num = Selection.SelectionCount
Print "There are " + str$(num) + " selected objects."


Freelance Graphics: Selection property

 See list of classes

(Read-only) Get a selection of objects in the application or document, or on the currently active page.

Data type

Selection

Syntax

set selection = object.Selection

Legal values

Any selection of objects.

Examples

Dim MySelection as Selection
Set MySelection = CurrentPage.Selection
MySelection.Group


Freelance Graphics: ShadowColor property

 See list of classes

(Read-write) Get or set the Shadow color for a bullet or text.

Data type

Color

Syntax

set color = shadowobject.ShadowColor

set shadowobject.ShadowColor = color

Legal values

Any instance of the Color class.


Freelance Graphics: ShadowDepth property

 See list of classes

(Read-write) Get or set the Shadow depth for a bullet or text.

Data type

Variant (Enumerated)

Syntax

shadowdepth = shadowobject.ShadowDepth

shadowobject.ShadowDepth = shadowdepth

Legal values

Value	Description
$ltsShadowDepthShallow	Short shadow
$ltsShadowDepthNormal	Normal shadow
$ltsShadowDepthDeep	Long shadow


Freelance Graphics: ShadowDirection property

 See list of classes

(Read-write) Get or set the Shadow direction for a bullet or text.

Data type

Variant (Enumerated)

Syntax

shadowdirection = shadowobject.ShadowDirection

shadowobject.ShadowDirection = shadowdirection

Legal values

Value	Description
$ltsShadowNone	No shadow
$ltsShadowBottomRight	Shadow on bottom right
$ltsShadowBottomLeft	Shadow on bottom left
$ltsShadowTopRight	Shadow on top right
$ltsShadowTopLeft	Shadow on top left


Deleted: Freelance Graphics: Shadow property
Freelance Graphics: Shadow property

 See list of classes

(Read-write) Determine if the text has a shadow.

Note	This property is ignored by Freelance Graphics, and is provided for compatibility with other Lotus products.

Data type

Integer (Boolean)

Syntax

flag = textobject.Shadow

textobject.Shadow = flag

Legal values

Value	Description
TRUE (non-0)	Text shadow
FALSE (0)	No text shadow


Freelance Graphics: Size property

 See list of classes

(Read-write) Determine the font or bullet size (in points).

Data type

Double

Syntax

points = object.Size

object.Size = points

Legal values

Any positive integer.


Freelance Graphics: SkipWelcome property

 See list of classes

(Read-write) Get or set the Skip welcome preference.

Data type

Integer (Boolean)

Syntax

flag = preferencesobject.SkipWelcome

preferencesobject.SkipWelcome = flag

Legal values

Value	Description
TRUE (non-0)	Skip Welcome on entry
FALSE (0)	Display Welcome on entry
Examples

CurrentApplication.Preferences.SkipWelcome = True


Freelance Graphics: SmallCaps property

 See list of classes

(Read-write) Determine if the font displays as Small caps (smaller point size, but all uppercase).

Note	This property is ignored by Freelance Graphics, and is provided for compatibility with other Lotus products.

Data type

Integer (Boolean)

Syntax

value = fontobject.SmallCaps

fontobject.SmallCaps = value

Legal values

Value	Description
TRUE (non-0)	Small caps
FALSE (0)	No small caps


Freelance Graphics: SmartLook property

 See list of classes

(Read-write) Get or set the SmartMaster look for the current presentation.

Data type

String

Syntax

smartlook = documentobject.SmartLook

documentobject.SmartLook = smartlook

Legal values

Any existing SmartMaster look.

Note	You can use the LotusScript Dir command to list the *.MAS files in the \SMASTERS\FLG directory.


Freelance Graphics: SnapToGrid property

 See list of classes

(Read-write) Get or set the Snap to grid preference.

Data type

Integer (Boolean)

Syntax

flag = preferencesobject.SnapToGrid

preferencesobject.SnapToGrid = flag

Legal values

Value	Description
TRUE (non-0)	Snap objects to grid
FALSE (0)	Do not snap objects to grid
Examples

CurrentApplication.Preferences.SnapToGrid = True


Freelance Graphics: Sound property

 See list of classes

(Read-write) Get or set the file name for a sound associated with the page.

Data type

String

Syntax

soundfilename = pageobject.Sound

pageobject.Sound = soundfilename

Legal values

Any existing sound file name.


Freelance Graphics: SpeakerNoteText property

 See list of classes

(Read-write) Get or set the speaker note text displayed on the page.

Data type

String

Syntax

speakernotetext = pageobject.SpeakerNoteText

pageobject.SpeakerNoteText = speakernotetext

Legal values

Any string value.


Freelance Graphics: StartNumber property

 See list of classes

(Read-write) Get or set the starting number for numbered bullets.

Data type

Integer

Syntax

startnumber = bulletobject.StartNumber

bulletobject.StartNumber = startnumber

Legal values

Any integer.


Freelance Graphics: StartupView property

 See list of classes

(Read-write) Get or set the Startup view preference.

Data type

Variant (Enumerated)

Syntax

startupview = preferencesobject.StartupView

preferencesobject.StartupView = startupview

Legal values

Value	Description
$ViewDraw	Current Page view
$ViewOutliner	Outliner view
$ViewSorter	Page Sorter view
$ViewSlideShow	Screen Show view
Examples

CurrentApplication.Preferences.StartupView = $ViewSorter


Freelance Graphics: StrikeThrough property

 See list of classes

(Read-write) Determine the strikethrough attribute for the font. Strikethrough is a horizontal line that prints through the middle of existing characters.

Data type

Integer (Boolean)

Syntax

value  = fontobject.StrikeThrough

fontobject.StrikeThrough = value

Legal values

Value	Description
TRUE (non-0)	Strikethrough on (for example)
FALSE (0)	Strikethrough off
Examples

MyTextObject.TextBlock.Font.StrikeThrough = True


Freelance Graphics: Style property

 See list of classes

(Read-write) Determine the Bullet style.

Data type

Variant (Enumerated)

Syntax

bulletstyle = bulletpropertiesobject.Style

bulletpropertiesobject.Style = bulletstyle

Legal values

Value	Description
$ltsBulletNone	None
$ltsBulletSmallLetters
$ltsBulletCapLetters
$ltsBulletRomanNums
$ltsBulletDecimalNums
$ltsBulletSmallDot
$ltsBulletLargeDot
$ltsBulletSmallSquare
$ltsBulletLargeSquare
$flwBulletDash
$ltsBulletArrowhead
$ltsBulletCheck
$ltsBulletX
$ltsBulletStar
$ltsBulletPlus
$flwBulletCurvedArrowhead
$ltsbulletRndSquare
$ltsBulletSmallDiamond
$ltsBulletLargeDiamond
$ltsBulletSmallArrowhead


Freelance Graphics: SubScript property

 See list of classes

(Read-write) Determine the subscript attribute for the font. Subscripted characters are placed just below the surrounding text.

Note	This property is ignored by Freelance Graphics, and is provided for compatibility with other Lotus products.

Data type

Integer (Boolean)

Syntax

value  = fontobject.SubScript

fontobject.SubScript = value

Legal values

Value	Description
TRUE (non-0)	Subscript on
FALSE (0)	Subscript off


Freelance Graphics: SuperScript property

 See list of classes

(Read-write) Determine the superscript attribute for the font. Superscripted characters are placed just above the surrounding text.

Note	This property is ignored by Freelance Graphics, and is provided for compatibility with other Lotus products.

Data type

Integer (Boolean)

Syntax

value  = fontobject.SuperScript

fontobject.SuperScript = value

Legal values

Value	Description
TRUE (non-0)	Superscript on
FALSE (0)	Superscript off


Freelance Graphics: Table property

 See list of classes

(Read-write) Get table properties for a drawing object. These properties are valid only when drawobject.IsTable is TRUE (non-0).

Data type

Table

Syntax

set table = drawobject.Table

Legal values

Any instance of the Table class.


Freelance Graphics: TemplateDir property

 See list of classes

(Read-write) Get or set the content topic directory preference.

Data type

String

Syntax

templatedirectory = preferencesobject.TemplateDir

preferencesobject.TemplateDir = templatedirectory

Legal values

Any directory.

Examples

CurrentApplication.Preferences.TemplateDir = "c:\lotus\smasters\flg"


Freelance Graphics: TemplatePageCount property

 See list of classes

(Read-only) Get the content topic page count.

Data type

Integer

Syntax

pagecount = documentobject.TemplatePageCount

Legal values

Any integer.


Freelance Graphics: TextBlock property

 See list of classes

(Read-only) Get the text block properties for a drawing object. These properties are valid only if drawobject.isText is TRUE (non-0).

Data type

TextBlock

Syntax

set textblock = drawobject.TextBlock

Legal values

Any instance of the TextBlock class.


Freelance Graphics: TextProperties property

 See list of classes

(Read-only) Get the text properties for a text block.

Data type

TextProperties

Syntax

set textproperties = textblockobject.TextProperties

Legal values

Any instance of the TextProperties class.

Usage

You can get a set of TextProperties, or you can get or set the individual properties (FirstIndent, Font, HorizontalAlignment, and so on) of the TextProperties class.


Freelance Graphics: TextTightness property

 See list of classes

(Read-write) Determine the Text tightness for the font.

Note	This property is ignored by Freelance Graphics, and is provided for compatibility with other Lotus products.

Data type

Integer

Syntax

tightness = fontobject.TextTightness

fontobject.TextTightness = tightness

Legal values

Any integer (always returns zero).


Freelance Graphics: Text property

 See list of classes

(Read-write) Get or set the text contained in a text block.

Data type

String

Syntax

text = textblockobject.Text

textblockobject.Text = text

Legal values

Any string value.

Examples

MyTextObject.TextBlock.Text = "This text will appear in the text block"


Freelance Graphics: Title property

 See list of classes

(Read-only) Get the title text block on a page.

Data type

DrawObject

Syntax

set titleobject = pageobject.Title

Legal values

Any instance of a page title text block.

Usage

You cannot set this property directly, but you can change the page title by changing the underlying Text object (pageobject.Title.Textblock.Text).


Freelance Graphics: Top property

 See list of classes

(Read-only) Get the top edge of an object, in twips.

Data type

Long

Syntax

toptwip = DrawObject.Top

Legal values

Any positive value.


Freelance Graphics: TransitionEffect property

 See list of classes

(Read-write) Get or set the transition effect for an object or page during a screen show.

Data type

Variant

Syntax

transitioneffect = object.TransitionEffect

object.TransitionEffect = transitioneffect

Legal values

The legal values vary by class.

Legal values for the Page class

Value	Description
$SSPageReplace	Instant replacement
$SSPageBottom	From bottom
$SSPageLeft	From left
$SSPageRight	From right
$SSPageBlinds	Blinds opening
$SSPageLouvers	Louvers opening
$SSPageBlocks	Block replacement
$SSPageCenter	From center out
$SSPageBoxIn	From outer box in
$SSPageZigZag	Zigzag replacement
$SSPageHorzln	Horizontal lines
$SSPageHVertln	Vertical lines
$SSPageTop	From top
$SSPageBoxOut	From inner box out
$SSPageHorizOut	Slide out horizontally
$SSPageVertOut	Slide out vertically
$SSPageFade	Fade to new
$SSPageDiagL	Diagonal left
$SSPageDiagR	Diagonal right
$SSPagePanL	Pan left
$SSPagePanR	Pan right
$SSPageScrollT	Scroll from the top
$SSPageScrollB	Scroll from the bottom
$SSPageDraw	Draw new page
$SSPageRain	Rain new page
$SSPagePBrush	Paintbrush new page
$SSPageShade	Shade new page
$SSPageCurtain	Open curtain
$SSPageBMPCol	Bitmap by colors
Legal values for the DrawObject class

Value	Description
$SSObjReplace	Instant replacement
$SSObjBottom	From bottom
$SSObjLeft	From left
$SSObjRight	From right
$SSObjBlinds	Blinds opening
$SSObjLouvers	Louvers opening
$SSObjBlocks	Block replacement
$SSObjCenter	From center out
$SSObjBoxIn	From outer box in
$SSObjZigZag	Zigzag replacement
$SSObjHorzln	Horizontal lines
$SSObjVertln	Vertical lines
$SSObjTop	From top
$SSObjBoxOut	From inner box out
$SSObjHorzOut	Slide out horizontally
$SSObjVertOut	Slide out vertically
$SSObjFade	Fade to new
$SSObjDiagL	Diagonal left
$SSObjDiagR	Diagonal right
$SSObjRain	Rain new page
$SSObjFlyL	Fly to the left
$SSObjFlyR	Fly to the right
$SSObjFlyU	Fly up
$SSObjFlyD	Fly down
$SSObjFlyLD	Fly to the left and down
$SSObjFlyRD	Fly to the right and down
$SSObjFlyLU	Fly to the left and up
$SSObjFlyRU	Fly to the right and up
$SSObjFlashS	Flash slow
$SSObjFlashM	Flash medium
$SSObjFlashF	Flash fast


Freelance Graphics: Type property

 See list of classes

(Read-write) Get or set the "Click here..." block type.

Data type

Variant

Syntax

type = placementblockobject.Type

placementblockobject.Type = type

Legal values

Value	Description
pbTypeText	Click here to enter text
pbTypeSymbol	Click here to add a symbol
pbTypeChart	Click here to create a chart
pbTypeOrgChart	Click here to create an organization chart
pbTypeTable	Click here to create a table
pbTypeButton	Click here to add a button


Freelance Graphics: Underline property

 See list of classes

(Read-write) Determine the Underline attribute for the font. This underline style is a solid line under both words and spaces.

Data type

Integer (Boolean)

Syntax

value  = fontobject.Underline

fontobject.Underline = value

Legal values

Value	Description
TRUE (non-0)	Underline on
FALSE (0)	Underline off
Examples

MyText.TextBlock.Font.Underline = True


Freelance Graphics: UndoEnabled property

 See list of classes

(Read-write) Get or set the Undo enabled preference.

Data type

Integer (Boolean)

Syntax

flag = preferencesobject.UndoEnabled

preferencesobject.UndoEnabled = flag

Legal values

Value	Description
TRUE (non-0)	Undo command enabled
FALSE (0)	Undo command disabled
Examples

CurrentApplication.Preferences.UndoEnabled = True


Freelance Graphics: UnitOfMeasure property

 See list of classes

(Read-write) Get or set the unit of measure used in the application. In Freelance Graphics, this is always twips.

Data type

Variant

Syntax

unitofmeasure = applicationobject.UnitOfMeasure

applicationobject.UnitOfMeasure = unitofmeasure

Legal values

The only legal value is $ltsScaleModeTwip.

Examples

CurrentApplication.UnitofMeasure = $ltsScaleModeTwip


Freelance Graphics: UserClassNameApplication property

 See list of classes

Available only in Freelance Graphics 97.

(Read-only) The Windows registry name of the application that corresponds to the OLE object.

Data type

String

Syntax

set MyOLEName = OLEObject.UserClassNameApplication

Legal values

The string value of the following Windows registry key: \CLSID\<{class id}>\AuxuserType\3. To use WordPro as an example, the string value would be: "Lotus WordPro 97".

Usage

Use this property to find the name of the application corresponding to the OLE object that you have found.

Example

' This script searches through the current page for an OLE object,
' then determines if the object is a WordPro document.
' If it is, it puts up a message box.
ForAll Obj in CurrentPage.Objects
   If Obj.IsOLEObject then
      If Obj.UserClassNameApplication = "Lotus WordPro 97" then
         MessageBox "This is a WordPro document."
      End If
   End If
End ForAll


Freelance Graphics: UserClassNameFull property

 See list of classes

Available only in Freelance Graphics 97.

(Read-only) The full name of the OLE object as registered in the Windows registry.

Data type

String.

Syntax

set MyOLEName = OLEObject.UserClassNameFull

Legal values

The string value of either of the following Windows registry keys: \CLSID\<{class id}>; or \<Prog Id>. To use WordPro as an example, the returned string would be: "WordPro.Document".

Usage

Use this property to find the full name of the OLE object as registered by the Windows registry.

Example

' This example searches through the current page for an OLE object,
' then puts the registry name up in a message box.
ForAll Obj in CurrentPage.Objects
   If Obj.IsOLEObject then
       Messagebox "This is the full registry name: " + Obj.UserClassNameFull
   End If
End ForAll


Freelance Graphics: UserClassNameShort property

 See list of classes

Available only in Freelance Graphics 97.

(Read-only) The short name of the OLE object as registered in the Windows registry.

Data type

String.

Syntax

set MyOLEName = OLEObject..UserClassNameShort

Legal Values

Returns the string that is in the Windows registry under the following key: \CLSID\<{class id}>\AuxUserType\2. To use WordPro as an example, the returned string would be: "Document."

Usage

Use this property to discover or verify the type of embedded object you have found.

Example

' This script searches through the current page for an OLE object,
' a WordPro document. If there is one, then it
' uses the native automation interface of the OLE object (WordPro, in this
' example) to make use of the script language of the OLE object.
ForAll Obj in CurrentPage.Objects
   If Obj.IsOLEObject then
      If Obj.UserClassNameShort = "Document" then
         Obj.Object.DocInfo
      End If
   End If
End ForAll


Freelance Graphics: VersionID property

 See list of classes

(Read-only) Determine the version of the code implementing an object. The version number changes for any release that is not 100% compatible with the previous release.

Data type

Long

Syntax

value = object.VersionID

Legal values

 Any numeric value.


Freelance Graphics: VerticalAlignment property

 See list of classes

(Read-write) Get or set the vertical alignment property for the text.

Data type

Variant (Enumerated)

Syntax

verticalalignment = textobject.VerticalAlignment

textobject.VerticalAlignment = verticalalignment

Legal values

Value	Description
$ltsAlignmentTop	Align at top
$ltsAlignmentVertCenter	Center
$ltsAlignmentBottom	Align at bottom
Examples

MyText.TextBlock.TextProperties.VerticalAlignment = $ltsAlignmentTop


Freelance Graphics: ViewMode property

 See list of classes

(Read-write) Get or set the view mode.

Data type

Variant (Enumerated)

Syntax

viewmode = documentobject.ViewMode

documentobject.ViewMode = viewmode

Legal values

Value	Description
$ViewDraw	Page view
$ViewOutliner	Outliner view
$ViewSorter	Page Sorter view
$ViewSlideShow	Screen Show view


Freelance Graphics: Visible property

 See list of classes

(Read-write) Get or set the visible attribute for the application.

Note	For this release, this is effectively read-only, and always TRUE; sets are ignored.

Data type

Integer (Boolean)

Syntax

value  = applicationobject.Visible

Legal values

Value	Description
TRUE (non-0)	Visible
FALSE (0)	Not visible


Freelance Graphics: WaitForClick property

 See list of classes

(Read-write) Determine if the object needs a mouse click in order to draw the object on the page during a screen show.

Data type

Integer (Boolean)

Syntax

value  = drawobject.WaitForClick

drawobject.WaitForClick = value

Legal values

Value	Description
TRUE (non-0)	Wait for click to draw the object
FALSE (0)	Do not wait for click to draw the object


Freelance Graphics: Width property

 See list of classes

(Read-write) Get or set the width of a border or line.

(Read-only) Get the width of the application window, document window, or drawing object.

Data type

Integer (ApplicationWindow and DocWindow classes)

Variant (Border and LineStyle classes)

Long (DrawObject classes)

Syntax

width = object.Width

object.Width = width

Legal values

ApplicationWindow, DocWindow, and DrawObject classes: any positive value representing the width in twips.

Border and LineStyle classes:

Value	Description
$ltsBorderWidthNone	Thinnest
$ltsBorderWidthVeryThin
$ltsBorderWidthThin
$ltsBorderWidthModeratelyThin
$ltsBorderWidthMedium
$ltsBorderWidthModeratelyThick
$ltsBorderWidthThick
$ltsBorderWidthVeryThick
$ltsBorderWidthExtremelyThick	Thickest
Examples

MyRect.Border.Width = $ltsBorderWidthThin


Freelance Graphics: WordDoubleUnderline property

 See list of classes

(Read-write) Determine the Word double underline attribute for the font. This is a double line under words but not spaces.

Note	This property is ignored by Freelance Graphics, and is provided for compatibility with other Lotus products.

Data type

Integer (Boolean)

Syntax

flag = fontobject.WordDoubleUnderline

fontobject.WordDoubleUnderline = flag

Legal values

Value	Description
TRUE (non-0)	WordDoubleUnderline on
FALSE (0)	WordDoubleUnderline off


Freelance Graphics: WordUnderline property

 See list of classes

(Read-write) Determine the Word underline attribute for the font. This is a single line under words but not spaces.

Note	This property is ignored by Freelance Graphics, and is provided for compatibility with other Lotus products.

Data type

Integer (Boolean)

Syntax

flag = fontobject.WordUnderline

fontobject.WordUnderline = flag

Legal values

Value	Description
TRUE (non-0)	WordUnderline on
FALSE (0)	WordUnderline off


Freelance Graphics: WorkDir property

 See list of classes

(Read-write) Get or set the Work directory preference.

Data type

String

Syntax

worddirectory = preferencesobject.WorkDir

preferencesobject.WorkDir = workdirectory

Legal values

Any directory.

Examples

CurrentApplication.Preferences.WorkDir = "c:\lotus\work\flg"


Freelance Graphics: Application class

Controls a Freelance Graphics session.

Base classes

BaseObject

Contained by

Class	Property
Document	Application
Usage

You can use the CurrentApplication predefined variable to reference the properties and methods of the current Application object.


Freelance Graphics: Application class members

Properties

ActiveDocument

ActiveDocWindow

Application AS Application class

ApplicationWindow

Colors AS Colors class

CurrentPrinter

DefaultFilePath

Documents AS Documents class

FontUnit

FullName

Interactive

Location

PageSelection AS PageSelection class

Parent

Path

Preferences AS Preferences class

Selection AS Selection class

UnitOfMeasure

Visible

Methods

CloseWindow

GetEnum

NearestColorFromRGB

NewDocument

OpenDocument

OpenDocumentFromInternet

OpenDocumentFromNotes

Quit

SetInternetOptions

Functions

None

Events

None


Freelance Graphics: ApplicationWindow class members

Properties

Height

Width

Methods

Cascade

Close

GotoNotes

Maximize

Minimize

Restore

Tile

Functions

None

Events

None


Freelance Graphics: ApplicationWindow class

The application's main window.

Base classes

BaseObject

Contained by

None

Usage

You can use the CurrentApplicationWindow predefined variable to reference the properties and methods of the currently selected ApplicationWindow object.


Freelance Graphics: Background class

Properties (color, fill pattern, etc.) of an object's background.

Base classes

BaseObject

Contained by

Class	Property
DrawObject	Background


Freelance Graphics: Background class members

Properties

BackColor

Color AS Color class

Pattern

Methods

RevertToStyle

Functions

None

Events

None


Freelance Graphics: BaseObject class

Abstract class used as the base class for all Freelance Graphics objects - no instances of this class ever exist.

Base classes

None

Contained by

All Freelance Graphics LotusScript classes. See Freelance Graphics LotusScript Classes A-Z.


Freelance Graphics: BaseObject class members

The BaseObject class is an abstract class used as the base class for all Freelance Graphics objects - no instances of this class ever exist. It contains the following properties.

Properties

Application

Description

IsDraggable

IsSelectable

IsValid

Name

Parent

VersionID

Methods

None

Functions

None

Events

None


Freelance Graphics: Border class

Properties of an object's edges.

Base classes

BaseObject

Contained by

Class	Property
DrawObject	Border


Freelance Graphics: Border class members

Properties

Color  AS Color class

Pattern

Width

Methods

RevertToStyle

Functions

None

Events

None


Freelance Graphics: BulletProperties class members

Properties

Color AS Color class

ShadowColor

ShadowDepth

ShadowDirection

Size

StartNumber

Style

Methods

None

Functions

None

Events

None


Freelance Graphics: BulletProperties class

Level-specific bullet properties.

Base classes

BaseObject

Contained by

Class	Property
TextBlock	BulletProperties


Freelance Graphics: Chart class

A chart of any type. The Freelance Graphics Chart class is derived from the DrawObject class and contains all methods and properties of the ChartBase class. You create a chart using the CreateChart method of the Page class.

Note	For more information about the LotusChart ChartBase class, see the Help contents under LotusScript, LotusChart LotusScript Reference, By Category, Classes.

Base classes

ChartBase

Contained by

Class	Property
DrawObject	Chart


Freelance Graphics: Chart class members

Properties

Application

Background

Border

BuildBullets

Chart

Delay

Description

ExeName

Height

IsChart

IsDraggable

IsGroup

IsImage

IsMedia

IsOleObj

IsPlacementBlock

IsSelectable

IsTable

IsText

IsValid

Left

LineLead

LineStyle

Media

Name

OleObj

Page

Parent

PlacementBlock

PlayPriority

Priority

Table

TextBlock

Top

TransitionEffect

VersionID

WaitForClick

Width

Methods

AddPoint

ConvertTo

Copy

Cut

Flip

GetObjectData

Item

Move

PutIntoPlacementBlock

Remove

Rotate

SetObjectData

Stretch

Ungroup

Functions

None

Events

None


Freelance Graphics: Color class members

Properties

Blue

Green

Red

Methods

GetNearestIndex

GetRGB

SameColor

Functions

None

Events

None


Freelance Graphics: Color class

A color. You can specify a color using either the Item or RGBToColor methods of the Colors class.

Base classes

BaseObject

Contained by

Class	Property
Background	Color, BackColor
Border	Color
BulletProperties	Color
LineStyle	Color
Font	FontColor
TextProperties	ShadowColor


Freelance Graphics: Colors class members

Properties

Count

Methods

ColorToRGB

GetIndex

GetNearestColor

IsEmpty

Item

RGBtoColor

Functions

None

Events

None


Freelance Graphics: Colors class

The color library.

Base classes

BaseObject

Contained by

Class	Property
Application	Colors


coordinates (defined)

The Freelance Graphics coordinate system has its origin (0,0) at the bottom left corner of the page. Coordinates are measured in twips  (1/1440 of an inch, or 1/567 of a centimeter). In LotusScript syntax, the horizontal coordinate is usually referred to as x, and the vertical coordinate as y.


Freelance Graphics: Document class members

Properties

Active

ActivePage

Application AS Application class

Author

Changed

Description

DocName

DocWindow AS DocWindow class

Embedded

FullName

IsOpen

Location

Pages AS Pages class

PageSelection AS PageSelection class

PageTransitionDelay

PageTransitionEffect

Parent

Path

ReadOnly

Selection AS Selection class

SmartLook

TemplatePageCount

ViewMode

Methods

Activate

AddToPageSelection

AddToSelection

Close

CopySelection

CreatePage

CreatePageFromTemplate

CutSelection

DeletePage

DeleteReviewer

Deselect

DistributeForComment

FindObject

GotoPage

OpenPresForCopy

Paste

PastePage

PasteSelectedPages

PublishToWeb

Print

PrintOut

RemoveFromSelection

RunDialog

Save

SaveAs

SaveAsToInternet

SaveAsToNotes

Select

SelectPageForCopy

SetViewMode

Show

StartGuidedTemplate

StopGuidedTemplate

Functions

None

Events

Activated

Created

Opened

PageCreated

PreClose

SaveAs

SavedAs

Saved

Save

SMCStarted


Freelance Graphics: Document class

Models a Freelance Graphics presentation. You can create an object of the Document class using the NewDocument method of the Application class.

Base classes

BaseObject

Contained by

Class	Property
Page	Document
Application	ActiveDocument
Usage

You can use the CurrentDocument predefined variable to reference the properties and methods of the currently selected Document object.


Freelance Graphics: Documents class members

Properties

Count

Methods

GetIndex

IsEmpty

Item

Functions

None

Events

None


Freelance Graphics: Documents class

A collection of Documents.

Base classes

BaseObject

Contained by

Class	Property
Application	Documents


Freelance Graphics: DocWindow class

A document window.

Base classes

BaseObject

Contained by

Class	Property
Document	DocWindow
Usage

You can use the CurrentDocWindow predefined variable to reference the properties and methods of the currently selected DocWindow object.


Freelance Graphics: DocWindow class members

Properties

Height

Width

Methods

Cascade

Close

Maximize

Minimize

Restore

Tile

Functions

None

Events

None


Freelance Graphics: DrawObject class

Any selectable object on a page in a presentation.

Base classes

BaseObject

Contained by

Class	Property
Page	Title
Usage

You can use the Selection or CurrentSelection predefined variable to reference the properties and methods of the currently selected DrawObject object.


Freelance Graphics: DrawObject class members

Properties

Background AS Background class

Border AS Border class

BuildBullets

Chart AS Chart class

Delay

DimPrevious

ExeName

Height

IsChart

IsGroup

IsImage

IsMedia

IsOleObj

IsPlacementBlock

IsTable

IsText

Left

LineStyle AS LineStyle class

Media AS Media class

Name

OleObj

Page AS Page class

PlacementBlock AS PlacementBlock class

PlayPriority

Priority

Table AS Table class

TextBlock AS TextBlock class

Top

TransitionEffect

WaitForClick

Width

Methods

AddPoint

ConvertTo

Copy

Cut

Delete

Flip

GetObjectData

Move

PutIntoPlacementBlock

Remove

Replicate

Rotate

SetObjectData

Stretch

Ungroup

Functions

None

Events

None


Freelance Graphics: Font class members

Properties

Bold

Case

DoubleUnderline

FontColor

FontName

Italic

Overstrike

Size

SmallCaps

StrikeThrough

SubScript

SuperScript

Underline

WordDoubleUnderline

WordUnderline

Methods

RevertToStyle

Functions

None

Events

None


Freelance Graphics: Font class

The style of a selection or block of text.

Base classes

BaseObject

Contained by

Class	Property
TextBlock	Font
TextProperties	Font


Freelance Graphics: LineStyle class members

Properties

Color AS Color class

Pattern

Width

Methods

RevertToStyle

Functions

None

Events

None


Freelance Graphics: LineStyle class

The style of a line, arrow, or connector.

Base classes

BaseObject

Contained by

Class	Property
DrawObject	LineStyle


Freelance Graphics: Media class members

Properties

FileName

Methods

Play

StopPlay

Functions

None

Events

None


Freelance Graphics: Media class

Derived from DrawObject - a movie or animation. To create a Media object, use the CreateMovie method of the Page class.

Base classes

BaseObject

Contained by

Class	Property
DrawObject	Media


Freelance Graphics: Objects class members

Properties

Count

Methods

GetIndex

IsEmpty

Item

Functions

None

Events

None


Freelance Graphics: Objects class

A collection of DrawObjects.

Base classes

BaseObject

Contained by

Class	Property
Page	Objects


Freelance Graphics: OLEObject class

Available only in Freelance Graphics 97.

Controls an OLE object.

Base classes

DrawObject.

Contained by

Class	Property
DrawObject	Varient
Usage

Use this class to manipulate the OLE object, to find out its name, to find out its type, to convert it, and to put it into a placement block.


Freelance Graphics: OLEObject class members

Properties

Object

UserClassNameApplication

UserClassNameFull

UserClassNameShort

Methods

Activate

DoVerb

Functions

None

Events

None


Freelance Graphics: Page class

One page or slide in a presentation. To create a Page object, you can use either the CreatePage method or the CreatePageFromTemplate method of the Document class.

Base classes

BaseObject

Contained by

Class	Property
DrawObject	Page
Document	ActivePage
Usage

You can use the CurrentPage predefined variable to reference the properties and methods of the currently selected Page object.


Freelance Graphics: Page class members

Properties

AutoTime

Delay

Document AS Document class

Exclude

Layout

Name

Number

Objects AS Objects class

Selection AS Selection class

Sound

SpeakerNoteText

Title

TransitionEffect

Methods

CopyPage

CreateArrow

CreateChart

CreateComment

CreateLine

CreateMovie

CreateObject

CreateOval

CreatePlacementBlock

CreateRect

CreateSymbol

CreateTable

CreateText

CutPage

DeleteSpeakerNote

FindNextObject

FindObject

GetSpeakerNoteMarkup

Move

Paste

PasteSpecial

Remove

Replicate

Functions

None

Events

Activated

Created


Freelance Graphics: Pages class members

Properties

Count

Methods

GetIndex

IsEmpty

Item

Functions

None

Events

None


Freelance Graphics: Pages class

A collection of Pages.

Base classes

BaseObject

Contained by

Class	Property
Document	Pages


Freelance Graphics: PageSelection class

The currently selected pages; derives methods and properties from Page.

Base classes

Page

Contained by

Class	Property
Application	PageSelection
Document	PageSelection


Freelance Graphics: PageSelection class members

Properties

SelectionCount

Methods

AddToSelection

ClearSelection

GetSelection

RemoveFromSelection

Select

Functions

None

Events

None


Freelance Graphics: PlacementBlock class members

Properties

ID

PromptText

Type

Methods

Activate

BrowseDiagrams

BrowseSymbols

Insert

Functions

None

Events

Clicked


Freelance Graphics: PlacementBlock class

Derived from DrawObject - a "Click here..." block. To create a "Click here..." block, use the CreatePlacementBlock method of the Page class.

Base classes

BaseObject

Contained by

Class	Property
DrawObject	PlacementBlock


Freelance Graphics: Preferences class

Freelance Graphics preferences.

Base classes

BaseObject

Contained by

Class	Property
Application	Preferences


Freelance Graphics: Preferences class members

Properties

AutoSave

AutoSaveInterval

BackupDir

BlackWhitePal

BorderDisplay

DisplayCoords

DisplayDrawRuler

DisplayGrid

DisplayTextRuler

OffsetReplicate

ScanSpeed

SkipWelcome

SnapToGrid

StartupView

TemplateDir

UndoEnabled

WorkDir

Methods

None

Functions

None

Events

None


RGB value (defined)

A type Long number specifying the amount of red, green, and blue tint in a 24-bit color. The high-order byte is 0 and is unused. The three low-order bytes each contain a binary value from 0 (no tint) to 255 (maximum tint), with the lowest-order byte representing blue, the next byte green, and the next byte red.


Freelance Graphics: Selection class members

Properties

SelectedObjects

SelectionCount

Methods

AddToSelection

Align

ClearSelection

Connect

GetSelection

Group

RemoveFromSelection

Select

Functions

None

Events

None


Freelance Graphics: Selection class

The currently selected draw objects; derives methods and properties from DrawObject.

Base classes

BaseObject

Contained by

Class	Property
Application	Selection
Page	Selection


Freelance Graphics: Table class

Derived from DrawObject - a Freelance Graphics table. To create a Table object, use the CreateTable method of the Page class.

Base classes

BaseObject

Contained by

Class	Property
DrawObject	Table


Freelance Graphics: Table class members

Properties

ColCount

RowCount

Methods

DeleteCol

DeleteRow

GetCell

InsertCol

InsertRow

Functions

None

Events

None


Freelance Graphics: TextBlock class

Derived from DrawObject - a text block or text shape.

Base classes

DrawObject

Contained by

Class	Property
DrawObject	TextBlock


Freelance Graphics: TextBlock class members

Properties

BulletProperties AS BulletProperties class

Font AS Font class

Text

TextProperties AS TextProperties class

Methods

ApplyStyle

CreateStyle

EnterEditMode

GetBulletCount

GetMarkup

GetNthBullet

LeaveEditMode

RevertToStyle

Functions

None

Events

None


Freelance Graphics: TextProperties class

Level-specific text properties.

Base classes

BaseObject

Contained by

Class	Property
TextBlock	TextProperties


Freelance Graphics: TextProperties class members

Properties

FirstIndent

Font AS Font class

HorizontalAlignment

LineLead

ParaIndent

Paralead

RightIndent

ShadowColor AS Color class

ShadowDepth

ShadowDirection

VerticalAlignment

Methods

None

Functions

None

Events

None


twips (defined)

A twip is a screen-independent unit of measurement (unlike a pixel, which is screen-dependent). There are 1440 twips to an inch and 567 twips to a centimeter. In LotusScript, all Freelance Graphics coordinates and sizes are specified in twips.


Freelance Graphics LotusScript Classes A-Z

A

Application class

ApplicationWindow class

B

Background class

BaseObject class

Border class

BulletProperties class

C

Chart class

Color class

Colors class

D

Document class

Documentsclass

DocWindow class

DrawObject class

E

(None)

F

Font class

G, H, I, J, K

(None)

L

LineStyle class

M

Media class

N

(None)

O

Objects class

OLEObject

P

Page class

Pages class

PageSelection class

PlacementBlock class

Preferences

Q, R

(None)

S

Selection class

T

Table class

TextBlock class

TextProperties class

U, V, W, X, Y, Z

(None)


Overview: Scripting in Freelance Graphics

The Application Programming Interface (API) for Freelance Graphics functionality. It is an extension of LotusScript--a cross-product Basic scripting language

You can use LotusScript to automate tasks the user does on a regular basis in Freelance Graphics.  For example, you can use LotusScript and the Freelance API to create applications that make it easy to edit a frequently used presentation (by attaching scripts to a SmartMaster). You can also write scripts that:

•	Attach to a page, a "Click here..." block, or SmartIcons

•	Operate on documents, pages, and objects

•	Make presentations using information gathered from various Lotus products, such as 1-2-3.

With the Freelance Graphics API, you can create "scripts" that execute when you click a button, an icon, or a "Click here..." block. You can also execute a script when you choose Edit - Script - Run.

You use the Script Editor and Debugger to create, edit, and debug scripts.

For more information, scroll down or click one of the following:

Sources of information

The structure of LotusScript

•	Classes

•	Collection classes

•	Class containment heirarchy

•	Properties

•	Methods

•	Events

Freelance Graphics API rules

•	Using names

•	Predefined global variables

Running a script

Sources of information

There is information in the Help system about the Freelance Graphics API (look under Help - Help Topics - LotusScript). There is also context sensitive Help for the Script Editor and Debugger and for the overall LotusScript language.

For more information about programming in LotusScript, use the coupon enclosed with Freelance Graphics to receive the  LotusScript Programmer's Guide.

The structure of LotusScript

The API and LotusScript use the principles of object-oriented programming. For information about object-oriented programming and LotusScript in Lotus applications, see the LotusScript Programmer's Guide.

Classes

The Freelance Graphics API consists of approximately 27 classes (custom LotusScript data types). Each class definition includes a set of properties and methods.  A small number of classes also have events.

When you use the Freelance Graphics LotusScript API, a document, for example, is an instance of the Document class. Individual elements on a page, such as a rectangle or a text block, are instances of the DrawObject class. For a list of classes, as well as reference information, see Freelance Graphics LotusScript Classes.

Most Freelance Graphics classes are derived from the BaseObject class. Since the BaseObject class is an abstract class, you never create instances, or objects, of that class.

Some classes are derrived from the DrawObject class and inherit properties and methods from it, such as the Selection class and the PlacementBlock class.

Collection classes

The collection classes in Freelance Graphics (Documents, Pages, Objects, and Colors) inherit from the BaseObject class. They are collections of objects.

The following table shows what indexes the collection classes use.

Class	Indexable by
Documents class	Number
Pages class	Number and name
Objects class	Number
Colors class	Name
You can get the index of any object by using the GetIndex property. The index number is by priority. Note that, the current document is always one. For information about collection classes, see the LotusScript Programmer's Guide.

Note	In Freelance Graphics script syntax, the index of the first item in a collection or table is one. In other Lotus applications (WordPro and Approach, for example) the index of the first item is zero. In the future, script indexing may be standardized across all Lotus applications. If zero becomes the standard for the first collection or table item, you will need to adjust all existing Freelance Graphics script statements containing collection or table references. You can use OPTION BASE to change the indexing base, see the LotusScript Reference for more information.

Class containment heirarchy

At the top of the heirarchy is the Freelance Graphics application. It contains the Documents class, a collection class representing all of the documents currently open in the application, and a Document class, representing individual presentations (.PRZ). Each Document class contains a Pages class, a collection class representing all of the pages in a document, and a Page class, representing an individual page. The Page class contains the DrawObject class, representing an element on the page, such as "Click here..." blocks, charts, and OLE objects.

Properties

Properties define the appearance and behavior of objects. Many object classes have properties defining visual attributes, such as background color, size, and location. Some properties apply to only one object class. For example, the Title property is unique to the Page class. On the other hand, the Width property is a property of the AppWindow, Border, DocWindow, and DrawObject classes.

Some classes may also act as a property for another class. For example, an instance of the Color class can be a property for an instance of the Font class. When a class is a property, the property description tells you.

For a list of properties, see Freelance Graphics LotusScript Properties.

Methods

Methods are subprograms you use to manipulate objects. For example, you can use the Move method to move an instance of the DrawObject class (a rectangle, for example), or you can use the Copy method to copy an instance of the DrawObject class.

For a list of methods, see Freelance Graphics LotusScript Methods.

Events

Events are scriptable actions that are associated with certain classes. For example, you can use the PlacementBlock class Cllick event to run a script when a placement block is clicked.

For a list of events, see Freelance Graphics LotusScript Events.

Freelance Graphics API rules

Using names

Names offer a convenient way of manipulating object and elements in the Freelance Graphics API.  In Freelance Graphics every object of Application class, Document class, Page class, and DrawObject class has a default name (however, objects of the Font, Background, Border, and LineStyle classes, and the chart classes do not have default names).

A Document object's name is the file name and is read-only. A DrawObject object has a default descriptive name (such as, PlacementBlock1 or Rectangle1) which can be changed through a script. The name of the page is shown in the Infobox or the IDE; it can be changed by editing the name in the InfoBox or by writing a script. Page 1 is the default name of the first page created in a presentation, Page 2 is the name of the next page, and so on.

The names of all objects with events are listed in the IDE. However, the actual names of the elements (default or otherwise) are not listed in the IDE. To find out the names of all the elements on a page that you can manipulate with a script, run the following script:

'Find the names of all objects on this page.
ForAll Objs in CurrentPage.Objects
   Print Obj.Name
End ForAll

Note	Print output appears in the Output window of the IDE.

So, for example, if you have several elements on a page (a text block, a rectangle and an elipse), and you want to manipulate the rectangle, you would use the script described above and learn that the rectangle's name is Rectange1. Once you know the name of an element, you can manipulate it. If you want to move the rectangle, write a script such as the following:

Set Rect = CurrentPage.FindObject("Rectangle1")
Rect.move 1000, 1000

You can even change the element's name. For example:

Rect.name = "Euclid"

Note	Once you change the name of an element, you must refer to it by the new name.  In the above example, once you renamed "Rectangle1" to "Euclid," you would have to refer to the rectangle as "Euclid," the next time you used the FindObject method, unless, of course, you change the name again.

Freelance Graphics stores the names given to pages and elements in the presentation so that they are available in future script sessions. You can find a draw object if you know its name by using the FindObject method, as demonstrated above, also see FindObject method.

You can use Bind to bind to an instance of the Document, Page, and DrawObject classes. For example:

Dim p as Page
Set p = Bind("Page 1")
Print p.number

Predefined global variables

Predefined variables let you operate on Freelance Graphics objects:

•	CurrentApplication--the current session of Freelance Graphics. Uses the properties and methods of the Application class.

•	CurrentApplicationWindow--the application window of the current session of Freelance Graphics. Uses the properties and methods of the ApplicationWindow class.

•	CurrentDocument--the current Freelance Graphics document. Uses the properties and methods of the Document class.

•	CurrentDocWindow--the current Freelance Graphics document window. Uses the properties and methods of the DocWindow class.

•	CurrentPage--the current page. Uses the properties and methods of the Page class.

•	Selection--the currently selected object(s). Uses the properties and methods of the DrawObject class.

For examples of how to use Global variables, see Using LotusScript predefined variables.

Running a script

You can attach scripts to a document, a page, a "Click here..." block, or SmartIcons, and that run when the user performs some action. Or, you can write scripts that run when you choose Edit - Script - Run, or are attached to an icon. These are different processes.

To attach (or assign) a script to a page or a "Click here..." block, you must be in a content topic (see To open a content topic). If the script is attached to a "Click here..." block or a page, it is saved in the content topic itself. The script runs automatically when the user performs some action, such as opening  the page or clicking the "Click here..." block. The action depends on which event you choose to use to trigger running the script.

See Attaching a script to a "Click here" block,  Attaching a script to a content page, or Creating a script button.

When you want to run a script by choosing Edit - Script - Run, you you first must have saved the script as an LSS or LSO file (a compiled LSS file). You run the script by choosing Edit - Script - Run, and typing the LSS (or LSO) file name.

For information about attaching scripts to SmartIcons, see Attaching a script to an icon.

For information about creating, editing, and debugging a script, see Overview: Creating, editing, and debugging a script.

 See related topics


Overview: Creating, editing, and debugging a script

The Script Editor and Debugger in which you write, run, and debug a script has Help. Press F1 when you want information. To launch the Integrated Development Environment (IDE) in Freelance Graphics, choose Edit - Script - Show Script Editor. For more information about working in the Script Editor and Debugger, look under Script Editor or Script Debugger in the Freelance Graphics Help index.

Tip	You can also review the list of available Freelance Graphics classes, properties, methods, and events by using the browser in the IDE. You can get help on a highlighted item by pressing F1.

For more information, scroll down or click one of the following:

Creating objects and assigning object references

Using LotusScript predefined product variables

•	Using global product variables to assign object variables

•	Creating objects

Running a script from the command line

Attaching scripts in SmartMaster content files

•	Using events

•	Placement blocks or "Click here..." blocks

Attaching scripts to icons

Sample scripts

Creating objects and assigning object references

You can access Freelance Graphics objects, including draw objects, pages, and whole presentations, by assigning a reference to that object. References can be assigned to existing objects or to objects that are created within a script.

To assign an existing Freelance Graphics object a reference variable, use the Set statement. Set must be used any time a reference variable is assigned to an instance of a class. For instance:

Dim MyPage as Page
Dim MyRect as DrawObject

' Set MyPage equal to the third Page in the presentation and MyRect
' equal to the second item on MyPage.
Set MyPage = CurrentDocument.Pages.Item(3)
Set MyRect = MyPage.Objects.Item(2)

' Set MyRect equal to the object named My Rectangle.
Set MyRect = CurrentPage.FindObject("My Rectangle")

To create a Freelance Graphics object, you must use the appropriate method. In general, to create an object follow the method available to the class. For example, the methods for creating draw objects belong to the Page class. To create a rectangle:

Dim MyRect as DrawObject
Set MyRect = CurrentPage.CreateRect (2000, 3000, 3000, 4000)

The method for creating a page belongs to the Document class:

Dim MyPage as Page
Set MyPage = CurrentDocument.CreatePage("Title of Page", 2)

The method for creating a document, NewDocument, belongs to the Application class. For example,

Set MyDoc = CurrentApplication.NewDocument("test.prz")

Using LotusScript predefined product variables

You can use the predefined global variables to write scripts that operate on the currently selected element, page, document, document window, application window, or application.

Selection is a global variable that represents the currently selected element or elements on a page. To change the pattern of the currently selected element or elements on the page:

Sub Main
   Selection.Background.Pattern=$LtsFillGray2
End Sub

CurrentPage represents the current page and uses the properties and methods of the Page class. To delay a page transition on the current page by ten seconds:

Sub Main
   CurrentPage.PageTransitionDelay=10
End Sub

Using global product variables to assign object variables

Use global product variables as a convenient way to access all other objects. Freelance Graphics always maintains valid values for you.

The Set statement must be used any time an object variable is assigned to an instance of a class. Also, the Pages and Objects classes are collections that can be indexed (as in an array). For example:

Dim MyRect As DrawObject
Dim MyPage As Page
' Set MyPage equal to the third page in the presentation,
' and MyRect to the second item on MyPage.
Set MyPage = CurrentDocument.Pages(3)
Set MyRect = MyPage.Objects(2)

Notice that in the example the predefined global variable, CurrentDocument, is used to refer to the current document and that the collection property, Pages, is used to refer to the third page of the document. Once you use the global variable, CurrentDocument, to assign the object variable, MyPage, the example shows how to use MyPage to refer to an explict element on a page.

You can access Freelance Graphics elements, including  pages and whole presentations, by assigning a reference to that element, page, or presentation. For example, you can assign references to elements that are created within a script or to already existing elements. In the example that follows, note the use of the global variable CurrentPage in combination with the CreateRect method, to assign the object variable, Rect1:

Dim Rect1 As DrawObject
' Create a rectangle of default size, then name it MyRect1.
Set Rect1 = CurrentPage.CreateRect
Rect1.Name = "MyRect1"

Later in a script you could use the name, MyRect1, that you gave to the rectangle in the above code example, to find the rectangle so that you can manipulate it in some way. You can find an existing named element (for example, MyRect1) on the current page by using the global variable CurrentPage and the FindObject method (a Page Class method that CurrentPage can use). For example:

Dim Obj1 As DrawObject
' Find a rectangle named MyRect1.
Set Obj1 = CurrentPage.FindObject("MyRect1")

To continue with this example, suppose you wanted to move the rectangle once you found it, use the following line of code. The code makes use of the object variable Obj1 that was set above and the Move method (a method of the DrawObject class, Obj1 is an instance of DrawObject).

Obj1.Move 1000,1000

Creating objects

To create a Freelance Graphics element, you must use the appropriate method. In general, you create an element by using a method of the appropriate class. You have already seen some examples of creating in the previous section, Using global variables to assign object variables. In this section, Creating objects, you will find more examples.

The methods for creating elements on a page belong to the Page class. For instance, to create a rectangle:

Dim MyRect As DrawObject
Set MyRect = CurrentPage.CreateRect (2000, 3000, 3000, 4000)

In this example, you create a rectangle, MyRect, by using the global variable CurrentPage (it uses the methods and properties of the Page class) and the CreateRect method (a Page class method) to create the rectangle. The numbers in parenthesis give the location and size and width of the rectangle on the page. See Freelance Graphics Reference Help for more information about how to use the CreateRect method.

The method for creating a page belongs to the Document class and so you can use it with the golbal variable CurrentDocument. In the following example the method, CreatePage, takes two parameters, the title of the page and the SmartLook (or template) that the page will be based on.

Dim MyPage As Page
Set MyPage = CurrentDocument.CreatePage("Title of Page", 2)

As part of the creation process elements and pages are given names by default. These names can be changed by scripts. Freelance Graphics stores the names given to pages and elements in the presentation, so that they are available in future script sessions. You can assign a variable that references an existing page in the following way:

Dim Pg as Page
Set Pg = CurrentDocument.Pages("Page 1")

Note	"Page 1" is the default name of the first page created in the presentation, "Page 2" is the name of the next page, and so on.

To change the name of a page using a script, do the following (continuing with the above example):

Pg.Name = "Agenda"

The NewDocument method for creating a document, belongs to the Application class. The following script creates a new document.

CurrentApplication.NewDocument

Note	You must save a document to name it.

Also, the OpenDocument method opens an existing document (in that sense it "creates" a Document object). For example, to open an exisitng presentation (PROPOSAL.PRZ) do the following:

Set MyDoc = CurrentApplication.OpenDocument("proposal.prz")

You use these methods to open or create presentations.

Running a script from the command line

You can run a script by typing

C:\Freelancepath\F32main /r lsscript.lss filename.prz

from the command line.

(lsscript.lss is the name of the script you want to run, and filename is the name of the presentation you want to run the script in.)

•	In Windows 95, click Start in the taskbar, choose Run, and type the command.

•	In Windows NT, Press CTRL+ESC to display the task list, type the command in the New Task edit box, then click the Run button.

Attaching scripts in SmartMaster content files

The advantage of attaching scripts in an .SMC file is that .SMC files are the "templates" for presentation files (.PRZ).  Scripts attached to .SMC files can be used each time you create a presentation using the .SMC file. However, scripts attached to a .PRZ file, can only be used in that .PRZ file. Generally speaking you attach scripts to events. For more information on content topics, see Overview: What is a content topic and Overview: Ways to create your own content topics.

Using Events

An event is an action associated with a given class, such as the Click event for the PlacementBlock class. You attach a script to an event. When the event occures, the script runs. There are events associated with the Document class, the Page class, and the Placement block class. For example, the Page class has two events: Activated and Created.

The PlacementBlock class event is Click. Placement blocks, that is, "Click here..." blocks, can, therefore, run a script when the user clicks the placement block.

Placement blocks or "Click here..." blocks

A "Click here..." block, also known in scripting as a placement block, can be either a TextPlacementBlock, a Button, a SymbolPlacementBlock, a ChartPlacementBlock, an OrgChartPlacementBlock, a TablePlacementBlock, or a DiagramPlacementBlock. Once created, all of these placement blocks can have scripts attached to them. You can create placement blocks only while:

•	Editing SmartMaster content files (.SMC files)

•	Editing SmartMaster look files (.MAS files)

•	Editing a page layout or backdrop in a .PRZ file

For information about creating and attaching a script to a "Click here" block, see Attaching a script to a "Click here" block.

Attaching scripts to icons

You can attach scripts to icons. For more information on icons, see Attaching a script to an icon.

Sample scripts

For examples of working code and of the object-oriented syntax used in the Freelance Graphics API, review the scripts that are used by SmartMaster content (SMC) files in Freelance Graphics. Scripts in these files refer to the source code contained in the file GTSCRPT.LSS, located in the \LOTUS\SMASTERS\FLG directory.

Caution	 Modifying script code in this file may cause problems with Freelance Graphics content topics. Make a copy of the file to experiment with.

 See related topics


Opening the Script Dialog Editor

Available only in Freelance Graphics 97.

To open the Script Dialog Editor, choose Edit - Script - Show Dialog Editor.


Opening the Script Editor and Debugger

To open the Script Editor and Debugger, choose Edit - Script - Show Script Editor.

 See related topics


Running a script

Follow these steps to run a script that is not attached to a page or a "Click here..." block.

1.	Choose Edit - Script - Run.

2.	Type the script file name in the File name box.

3.	Click Open.

Note	To see error messages and output, open the Output window; choose Edit - Script - Show Output Window.

 See related topics


Script information for upgraders

Information for upgraders

This topic describes the difference between scripting in Freelance Graphics 96 and Freelance Graphics 97.

For more information, scroll down or click one of the following:

Backward compatability

Attaching scripts in .PRZ files

Events

Objects listed in the IDE

Default object names

Indexing collections

The dialog box editor

The transcript window is now the output window

Printing from the IDE

Backward compatability

Scripts that were created in Freelance Graphics 96 will run in Freelance Graphics 97.  However, scripts written in Freelance Graphics 97 and saved in .PRZ files or .SMC files will not run and cannot be edited in Freelance Graphics 96.  If you run an .LSS file created in Freelance Graphics 97 by choosing Edit - Script - Run, the script will work in Freelance Graphics 96 if it does not use any of the new scripting features.

In addition, if you open a Freelance Graphics 97 file containing scripts in Freelance Graphics 96 and then save it, the scripts stored in the file will be lost.

If you open a Freelance Graphics 96 presentation in Freelance Graphics 97, open the IDE, and resave the script, the 96 script format will be converted to the 97 format and these scripts will no longer be recognized by Freelance Graphics 96.

A Freelance Graphics 96 .LSO file will run in Freelance Graphics 97.  However, a Freelance Graphics 97 .LSO may fail in Freelance Graphics 96.

Attaching scripts in .PRZ files

In Freelance Graphics 97 you can attach scripts to objects in .PRZ files (presentation files) as well as .SMC files (SmartMaster with content files). In Freelance Graphics 96 you could only attach scripts to .SMC files. However, as a general rule, .SMC files are the most useful files to put scripts in.

Events

Freelance Graphics now has events for the following classes:

Class	Events
Document class	Activated, Created, Opened, PageCreated, PreClose, Save, SaveAs, Saved, SavedAs, SMCStarted
Page class	Activated, Created
PlacementBlock class	Clicked
For more information about these events, see Freelance Graphics LotusScript Events A-Z.

Objects listed in the IDE

On the current page, you can see the list of objects that have event handlers in the Object drop-down box of the IDE. You can use the drop-down box description in a script as a reference to the object it represents, but you must put square brackets around it. For example:

[SymbolPlacementBlock1].Insert(MyCircle1)

Using the name of an object as listed in the IDE is a simple way of manipulating the object in a script.

Default object names

In Freelance Graphics 97 all instances of the DrawObject class have default names (not just the page and the document as in Freelance Graphics 96). For information about using names in a script see, Using names.

Indexing collections

The following table shows what indexes the collection classes use.

Class	Indexable by
Documents class	Number
Pages class	Number and name
Objects class	Number
Colors class	Name
In Freelance Graphics, the numerical index value of the first item in a collection is one. In other Lotus products (Word Pro and Approach, for example) the index of the first item is zero.

Note	You can use the Option Base statement to change the indexing base, see the LotusScript Language Reference for more information.

The dialog box editor

Freelance Graphics 97 has a dialog box editor. The editor offers more flexibility than the RunDialog method, however, the RunDialog method is still available.  For more information about the dialog editor; open the editor, by choosing Edit - Scipt - Show Dialog Editor, then choose Help.

The transcript window is now the output window

The Transcript window was used in Freelance Graphics 96 to show error messages and output. However, in Freelance Graphics 97, error messages (generated by Event handlers and scripts run through the IDE) appear in the error message box of the IDE.

In Freelance Graphics 97 the Transcript window is now refered to as the Output window. It automatically comes up when a script error happens outside of the IDE, for example, when you run a script by choosing Edit - Script - Run or when you run a script from an icon. In addition, when you run presentations containing scripts that were created in Freelance Graphics 96, the only way you can see error messages is by opening the Output window, that is, by choosing Edit - Script - Show Output Window.

Printing from the IDE

You can print a script from the IDE in Freelance Graphics 97; from the IDE menu choose File - Print Script.


Frequently-asked questions

Here are some tips and scripts for Freelance Graphics covering common tasks , general issues , and troubleshooting.

For more information, scroll down or click one of the following:

How do I create a presentation using a script?

Create a presentation

How do I create a placement block (or a button) and attach a script to it?

Create a placement block

How do I attach a script to a placement block

How do I create or add presentation elements in a script?

Add pages

Add a text block

Add clip art

How do I edit elements on a page using a script?

Add multiple lines as a text block

Copy and paste an object

Change the look of a presentation

Search and replace

Access text in a text block

How do I work with views in a script?

Rearrange pages

Change the view

How do I print using a script?

Print a page

How do I run a presentation as a ScreeShow in a script?

Run a screen show

How do I learn about Freelance Graphics classes, properties, methods, and events?

List of classes, properties, methods, and events

How do I trouble shoot?

Why doesn't my attached script run?

Can I create multiple buttons?

Common Tasks

How do I create a placement block (that is, a button or a "Click here..." block)?

You must be editing a SmartMaster with content file (that is, an .SMC file), a SmartLook file (a .MAS file), or a page layout or backdrop in a .PRZ file. To create a button or a "Click here..." block choose Create - "Click here" Block. You can then attach scripts to the "Click here..." block by making use of the placement block Click event.

Note	There are several instances of the PlacementBlock class in Freelance Graphics: TextPlacementBlock, SymbolPlacementBlock, ChartPlacementBlock, OrgChartPlacementBlock, TablePlacementBlock, DiagramPlacementBlock, and Button. You can specify the type when you create the placement block; TextPlacementBlock is the default. Do not confuse the TextPlacementBlock with the TextBlock, they are different. A TextBlock does not have an event associated with it, and a script cannot be attached to it.

How do I attach a script to a placement block (that is, a button or a "Click here..." block)?

You must be editing a SmartMaster with content (that is, an .SMC file) or a presentation file (.PRZ) that already has "Click here..." blocks or buttons. Open the IDE choosing Edit - Script - Open Editor or, if you are editing a .SMC file, you can open the InfoBox for the button or "Click here..." block, click the Basics panel and open the IDE from there, using the Edit/Create button. Then you use the placement block Click event to write a script that runs when the user clicks the "Click here..." block.

In short, you can attach a script any element that has an Event associated with it: a placement block, a page, or a document.

How do I create a new presentation?

You can use the NewDocument method to create a new Freelance Graphics presentation.  The following example creates a new presentation in a separate window, leaving the current presentation still open in its own window.

CurrentApplication.NewDocument "MyPresentation", , "buttons.mas"

How do I copy and paste an object?

You can use the Replicate method or the Copy and Paste method to create a duplicate of an element.

Sub MakeReplicate

Dim MyRectangle as DrawObject
Dim NewCopy as DrawObject
' Assign object variables, create a rectangle and make a replicate of it.
MyRectangle = CurrentPage.CreateRect
Set NewCopy = MyRectangle.Replicate

End Sub

You can use the Copy and Paste methods with any object or group of objects on the page.  For example:

Sub ClipboardDemo

Dim MyRectangle as DrawObject
' Make a new rectangle
MyRectangle = CurrentPage.CreateRect
' Copy the rectangle to the clipboard
MyRectangle.Copy
' Pastes clipboard contents onto the page
Set NewObj = CurrentPage.Paste

End Sub

How do I change the view?

You can change between Current Page view, Outline view, or the Sorter view:

CurrentDocument.ViewMode = $ViewOutliner
CurrentDocument.ViewMode = $ViewSorter
CurrentDocument.ViewMode = $ViewDraw

Most product commands are available from Current Page view, and Current Page view should be used for most scripts.

Note	Many script commands do not alter the appearance of the screen. So, while a script runs, you may not see any action taking place.

How do I add pages?

You can use the CreatePage or CreatePageFromTemplate (when there is an active Content SmartMaster) commands to add new pages. Either of the following examples will work.

Example 1:

' Add a title page
CurrentDocument.CreatePage "My title page", 1

' Or, you can add a title page from the current content Smart Master.
CurrentDocument.CreatePageFromTemplate "A Content SmartMaster " +_
   "title page", 1

Example 2:

In this example,  the object variable, MyPage, is identified with the page that is created.

' Add a title page and assign an object variable to the new page.
Set MyPage = CurrentDocument.CreatePage ("My title page", 1)

' Or, you can add a title page from the current content Smart Master
Set MyPage = CurrentDocument.CreatePageFromTemplate _
   ("A Content SmartMaster page", 1)

How do I change the look of a presentation?

You can change the look of the current presentation by setting the SmartLook property:

' Change the look to the Buttons SmartMaster set.
CurrentDocument.SmartLook = "buttons.mas"

How do I add a block of text to a page?

As in the user interface, there are two ways to add text to a presentation page with LotusScript.

•	Create a new text object on the page

•	Fill in an existing text block.

To create a new text object on the current page, use the CreateText command as follows:

Set MyTextBlock = CurrentPage.CreateText
MyTextBlock.Text = "Here's a line of text"

There are three ways to access an element iin a presentation. In what follows, the examples use each of these three ways to access an existing text block:

1.	You can assign a DrawObject variable to the text block. For example:

Set MyClickHere = Bind DrawObject("Text2")
' Use the variable and the Text method to put text into the object.
MyClickHere.Text = "Here is a line of text"

2.	If the desired text block is selected, you can access it through the current selection:

Selection.Textblock.Text = "Here is a line of text."

3.	You can iterate over the objects on the current page and find a "Click here..." block (that is, a placement block) and then put text in it. Note, when you put text in a placement block, it becomes a text block and it is no longer recognized as a placement block.

ForAll obj in CurrentPage.Objects
   If obj.IsPlacementBlock Then
      If obj.Type = $pbTypeText then
         obj.Text = "Here's a line of text."
      End If
   End If
End ForAll

How do I add clip art?

You can use the CreateSymbol command to add existing clip art or diagrams to the current page.

' Add the 3rd animal clip art drawing
CreateSymbol "animals", 3

or

Set MySymbol = CreateSymbol ("animals", 3)

To place a symbol in an existing  placement block, you can iterate through all of the elements on the current page until you find a placement block object.

ForAll obj in CurrentPage.Objects
   If obj.IsPlacementBlock Then
      If obj.PromptText = "Click here to add clip art" Then
         obj.insert CreateSymbol ("animals", 3)
      End If
   End If
End ForAll

How do I rearrange the pages of a presentation?

You can move pages by setting their page number.

ThisPage = CurrentPage.Number
CurrentPage.Number = ThisPage + 2

How do I print a presentation?

The Print method prints the active presentation to the current printer.

CurrentDocument.Print

How do I run a presentation as a screen show?

Under LotusScript, a screen show is another view mode. You can start a presentation as a screen show from script by changing the ViewMode property.

CurrentDocument.ViewMode = $ViewSlideShow

General issues

Is there a list of all classes, properties, methods, and events I can access in a presentation?

For a complete list of classes, properties, methods, and events see Freelance Graphics LotusScript A-Z. You can also see a list of properties, methods, and events for each class in the IDE.

How do I access text in a TextBlock

Here are two examples of how to access a text block.:

1.	You can assign a DrawObject variable to the text block then alter the text.

Set MyClickHere = Bind DrawObject("Subtitle")
MyClickHere.TextBlock.Text = "Here's a line of text"

Note	You can use Bind to bind to instances of the Document, Page, and DrawObject classes.

2.	If the desired text block is selected, you can access it by using the current selection:

Set MyClickHere = Selection.Textblock

How do I add multiple lines of text to a text block?

To convert lines of text from another source to a text block, you first convert the text to Freelance Graphics markup format, which uses the characters "<=" in place of carriage return and line feed characters.

The following function converts a Notes-formatted string to a markup-formatted string:

Function ConvStrForFLG (Str1 As String) As String

' Converts a Notes string to a string that FLG can use --
' i.e. converts the carriage return / line feed
' (chr(13) / chr(10)) to equivalent markup characters ("<=").
'   Inputs:  Str1 - string to convert
'   Outputs: none
'   Returns: converted string in markup form

Dim pStr1, pStr2 As Integer

ConvStrForFLG$ = ""
pStr1 = 1
pStr2 = Instr (Str1, Chr$(13))

' Convert embedded CR/LF
Do While pStr2 <> 0
   ConvStrForFLG$ =  ConvStrForFLG$ + _
      Mid$ (Str1, pStr1, pStr2 - pStr1) + "<="
   pStr1 = pStr2 + 2
   pStr2 = Instr(pStr1, str1, Chr$(13))
Loop

' Handle last part of string
If Len (Mid$(Str1, pStr1)) <> 0 Then
   ConvStrForFLG$ = ConvStrForFLG$ + Mid$(Str1, pStr1)
End If

End Function

How do I search and replace text?

LotusScript in Freelance Graphics provides no direct methods for searching and replacing text in this release.  However, search and replace functions are available to the user under the Freelance Graphics Edit menu.

You can write a script that searches the document for text blocks, then extracts text strings, and then does compares with each string member.

Troubleshooting

Why doesn't my attached script run when I click the button?

There are two possibilities:

1.	If a placement block has been filled in with text, a chart, and so on, then it is no longer identified as a placement block. Any script that operates on that placement block will no longer recognize it as a placement block and the script will fail to execute.  For example, if you are searching for a placement block, but all there is on the page is a "Click here..." block that is now filled in with text, then using IsPlacementBlock will not recognize any placement block on the page. On the other hand, IsTextBlock will recognize the block.

Note	If you delete the text that was entered into a "Click here..." block, then it is recognized as a placement block again.

2.	If a placement block is renamed in the course of a script's execution or by user intervention, then the changed name will cause a script that looks for that placement block using the old name to fail. For example, if "TextPlacementblock1" gets renamed "My block," the script that works on that placement block would have to take the name change into account, or else the script will fail.

Can I create multiple buttons with attached scripts on a page?

Yes, multiple buttons are accessible from a SmartMaster content (.SMC) file and from a SmartMaster look (.MAS) file.


Freelance Graphics LotusScript Methods A-Z

A

Activate method

AddPoint method

AddToPageSelection method

AddToSelection method

Align method

ApplyStyle method

B

BrowseDiagrams method

BrowseSymbols method

C

Cascade method

ClearSelection method

Close method

CloseWindow method

ColorToRGB method

Connect method

ConvertTo method

Copy method

CopyPage method

CopySelection method

CreateArrow method

CreateChart method

CreateComment method

CreateLine method

CreateMovie method

CreateObject

CreateOval method

CreatePage method

CreatePageFromTemplate method

CreatePlacementBlock method

CreateRect method

CreateStyle method

CreateSymbol method

CreateTable method

CreateText method

Cut method

CutPage method

CutSelection method

D

DeleteCol method

DeletePage method

DeleteReviewer method

DeleteRow method

DeleteSpeakerNote method

Deselect method

DistributeForComment method

DoVerb method

E

EnterEditMode method

F

FindNextObject method

FindObject method

Flip method

G

GetBulletCount method

GetCell method

GetEnum method

GetIndex method

GetMarkup method

GetNearestColor method

GetNearestIndex method

GetNthBullet method

GetObjectData method

GetRGB method

GetSelection method

GetSpeakerNoteMarkup method

GotoNotes method

GotoPage method

Group method

H

(None)

I

Import method

Insert method

InsertCol method

InsertRow method

IsEmpty method

Item method

J, K

(None)

L

LeaveEditMode method

M

Maximize method

Minimize method

Move method

N

NearestColorFromRGB method

NewDocument method

O

OpenDocument method

OpenDocumentFromInternet

OpenDocumentFromNotes

OpenPresForCopy method

P

Paste method

PastePage method

PasteSelectedPages method

PasteSpecial method

Play method

Print method

PrintOut method

PublishToWeb

PutIntoPlacementBlock method

Q

Quit method

R

Remove method

RemoveFromSelection method

Replicate method

Restore method

RevertToStyle method

RGBToColor method

Rotate method

RunDialog method

S

SameColor method

Save method

SaveAs method

SaveAsToInternet

SaveAsToNotes

Select method

SelectPageForCopy method

SetInternetOptions

SetObjectData method

SetViewMode method

Show method

StartGuidedTemplate method

StopGuidedTemplate method

StopPlay method

Stretch method

T

Tile method

U

Ungroup method

V, W, X, Y, Z

(None)


Freelance Graphics LotusScript Properties A-Z

A

Active property

ActiveDocument property

ActiveDocWindow property

ActivePage property

Application property

ApplicationWindow property

Author property

AutoSave property

AutoSaveInterval property

AutoTime property

B

BackColor property

Background property

BackupDir property

BlackWhitePal property

Blue property

Bold property

Border property

BorderDisplay property

BuildBullets property

BulletProperties property

C

Case property

Changed property

Chart property

CodePage property

ColCount property

Color property

Colors property

Count property

CurrentPrinter property

D

DefaultFilePath property

Delay property

Description property

DimPrevious property

DisplayCoords property

DisplayDrawRuler property

DisplayGrid property

DisplayTextRuler property

DocName property

Document property

Documents property

DocWindow property

DoubleUnderline property

E

Embedded property

Exclude property

ExeName property

F

FirstIndent property

Font property

FontColor property

FontName property

FontUnit property

FullName property

G

Green property

H

Height property

HorizontalAlignment property

I

ID property

Interactive property

IsChart property

IsDraggable property

IsGroup property

IsImage property

IsMedia property

IsOleObj property

IsOpen property

IsPlacementBlock property

IsSelectable property

IsTable property

IsText property

IsValid property

Italic property

J, K

(None)

L

Layout property

Left property

LineLead property

LineStyle property

Location property

M

Media property

N

Name property

Number property

O

Object

Objects property

OffsetReplicate property

OleObj property

Overstrike property

P

Page property

Pages property

PageSelection property

PageTransitionDelay property

PageTransitionEffect property

ParaIndent property

Paralead property

Parent property

Path property

Pattern property

PlacementBlock property

PlayPriority property

Preferences property

Priority property

PromptText property

Q

(None)

R

ReadOnly property

Red property

RemoveMedia property

RightIndent property

RowCount property

S

ScanSpeed property

SelectedObjects property

Selection property

SelectionCount property

ShadowColor property

ShadowDepth property

ShadowDirection property

Size property

SkipWelcome property

SmallCaps property

SmartLook property

SnapToGrid property

Sound property

SpeakerNoteText property

StartNumber property

StartupView property

StrikeThrough property

Style property

SubScript property

SuperScript property

T

Table property

TemplateDir property

TemplatePageCount property

Text property

TextBlock property

TextProperties property

TextTightness property

Title property

Top property

TransitionEffect property

Type property

U

Underline property

UndoEnabled property

UnitOfMeasure property

UserClassNameApplication

UserClassNameFull

UserClassNameShort

V

VersionID property

VerticalAlignment property

ViewMode property

Visible property

W

WaitForClick property

Width property

WordDoubleUnderline property

WordUnderline property

WorkDir property

X, Y, Z

(None)


Freelance Graphics LotusScript A-Z

A

Activate method

Activated event (Document)

Activated event (Page)

Active property

ActiveDocument property

ActiveDocWindow property

ActivePage property

AddPoint method

AddToPageSelection method

AddToSelection method

Align method

Application class

Application property

ApplicationWindow class

ApplicationWindow property

ApplyStyle method

Author property

AutoSave property

AutoSaveInterval property

AutoTime property

B

BackColor property

Background class

Background property

BackupDir property

BaseObject class

BlackWhitePal property

Blue property

Bold property

Border class

Border property

BorderDisplay property

BrowseDiagrams method

BrowseSymbols method

BuildBullets property

BulletProperties class

BulletProperties property

C

Cascade method

Case property

Changed property

Chart property

ClearSelection method

Clicked event

Close method

CloseWindow method

CodePage property

ColCount property

Color class

Color property

Colors class

Colors property

ColorToRGB method

Connect method

ConvertTo method

Copy method

CopyPage method

CopySelection method

Count property

CreateArrow method

CreateChart method

CreateComment method

CreateLine method

CreateMovie method

CreateObject method

CreateOval method

CreatePage method

CreatePageFromTemplate method

CreatePlacementBlock method

CreateRect method

CreateStyle method

CreateSymbol method

CreateTable method

CreateText method

Created event (Document)

Created event (Page)

CurrentPrinter property

Cut method

CutPage method

CutSelection method

D

DefaultFilePath property

Delay property

DeleteCol method

DeletePage method

DeleteReviewer method

DeleteRow method

DeleteSpeakerNote method

Description property

Deselect method

DimPrevious property

DisplayCoords property

DisplayDrawRuler property

DisplayGrid property

DisplayTextRuler property

DistributeForComment method

DocName property

Document class

Document property

Documents class

Documents property

DocWindow class

DocWindow property

DoubleUnderline property

DoVerb method

DrawObject class

E

Embedded property

EnterEditMode method

Exclude property

ExeName property

F

FindNextObject method

FindObject method

FirstIndent property

Flip method

Font class

Font property

FontColor property

FontName property

FontUnit property

FullName property

G

GetBulletCount method

GetCell method

GetEnum method

GetIndex method

GetMarkup method

GetNearestColor method

GetNearestIndex method

GetNthBullet method

GetObjectData method

GetRGB method

GetSelection method

GetSelection method

GetSpeakerNoteMarkup method

GotoNotes method

GotoPage method

Green property

Group method

H

Height property

HorizontalAlignment property

I

ID property

Import method

Insert method

InsertCol method

InsertRow method

Interactive property

IsChart property

IsDraggable property

IsEmpty method

IsGroup property

IsImage property

IsMedia property

IsOleObj property

IsOpen property

IsPlacementBlock property

IsSelectable property

IsTable property

IsText property

IsValid property

Italic property

Item method

J, K

(None)

L

Layout property

LeaveEditMode method

Left property

LineLead property

LineStyle class

LineStyle property

Location property

M

Maximize method

Media class

Media property

Minimize method

Move method

N

Name property

NearestColorFromRGB method

NewDocument method

Number property

O

Object property

Objects class

Objects property

OffsetReplicate property

OleObj property

OLEObject class

OpenDocument method

OpenDocumentFromInternet method

OpenDocumentFromNotes method

Opened event

OpenPresForCopy method

Overstrike property

P

Page class

PageCreated event

Page property

Pages class

Pages property

PageSelection class

PageSelection property

PageTransitionDelay property

PageTransitionEffect property

ParaIndent property

Parent property

Paste method

PastePage method

PasteSelectedPages method

PasteSpecial method

Paralead property

Path property

Pattern property

PlacementBlock class

PlacementBlock property

Play method

PlayPriority property

PreClose event

Preferences class

Preferences property

Print method

PrintOut method

Priority property

PromptText property

PublishToWeb method

PutIntoPlacementBlock method

Q

Quit method

R

ReadOnly property

Red property

Remove method

RemoveFromSelection method

RemoveMedia property

Replicate method

Restore method

RevertToStyle method

RGBToColor method

RightIndent property

Rotate method

RowCount property

RunDialog method

S

SameColor method

Save event

Save method

SaveAs event

SaveAs method

Saved event

SavedAs event

SaveAsToInternet method

SaveAsToNotes method

ScanSpeed property

Select method

SelectedObjects property

Selection class

Selection property

SelectionCount property

SelectPageForCopy method

SetInternetOptions method

SetObjectData method

SetViewMode method

Shadow property

ShadowColor property

ShadowDepth property

ShadowDirection property

Size property

SkipWelcome property

SmallCaps property

SmartLook property

SMCStarted event

SnapToGrid property

Sound property

SpeakerNoteText property

StartGuidedTemplate method

StartNumber property

StartupView property

StopGuidedTemplate method

StopPlay method

Stretch method

StrikeThrough property

Style property

SubScript property

SuperScript property

T

Table class

Table property

TemplateDir property

TemplatePageCount property

Text property

TextBlock class

TextBlock property

TextProperties class

TextProperties property

TextTightness property

Tile method

Title property

Top property

TransitionEffect property

Type property

U

Underline property

UndoEnabled property

Ungroup method

UnitOfMeasure property

UserClassNameApplication property

UserClassNameFull property

UserClassNameShort property

V

VersionID property

VerticalAlignment property

ViewMode property

Visible property

W

WaitForClick property

Width property

WordDoubleUnderline property

WordUnderline property

WorkDir property

X, Y, Z

(None)


Example: Activated event (Document)
' Example: Activated event (Document)

'// In this example, a message box comes up when the user activates the document or  //
'// opens the document. //

Sub Activated(Source As Document)

     MessageBox "The document has just been opened or activated."

End Sub


Example: Activated event (Page)
' Example: Activated event (Page)

'// In this example, a message box comes up when the user activates the page.//

Sub Activated(Source As Page)

     MessageBox "The page has just been activated."

End Sub


Example: Clicked event
' Example: Clicked event

'// In this example, a message box comes up when the placement block that this //

'// script is attached to has been clicked. //

Sub Clicked(Source As PlacementBlock)

     MessageBox " The 'Click here...' block has just been clicked. "

End Sub


Example: PreClose event
' Example: PreClose event

'// In this example, a message box comes up when Freelance Graphics receives an //

'// instruction to close the document. //

Sub PreClose(Source As Document)

     MessageBox " The document is about to close. "

End Sub


Example: Created event (Document)
' Example: Created event (Document)

'// In this example, a message box comes up when a new document has been created.//

Sub Created(Source As Document)

     MessageBox " A new document has been created. "

End Sub


Example: Created event (Page)
' Example: Created event (Page)

'// In this example, a message box comes up when a new page has been created.//

Sub Created(Source As Page)

     MessageBox " A new page has been created. "

End Sub


Deleted: Example: DocumentCreated event
' Example: DocumentCreated event

'// In this example, a message box comes up when a new document has been created.//

Sub DocumentCreated(Source As Application)

     MessageBox " A new document has been created. "

End Sub


Deleted: Example: DocumentOpened event
' Example: DocumentOpened event

'// In this example, a message box comes up when a document has been opened.//

Sub DocumentOpened(Source As Application)

     MessageBox " A document has been opened. "

End Sub


Deleted: Example: DocumentOpen event
' Example: DocumentOpen event

'// In this example, a message box comes up when Freelance Graphics receives a command to open a '// document, but before the document has actually opened.//

Sub DocumentOpen(Source As Application)

     MessageBox " A document is about to be opened. "

End Sub


Example: SMCStarted event
' Example: SMCStarted event

'// In this example, a message box comes up when a SmartMaster with content is //

'// chosen as a basis for creating a presentation page. It can be used to explain what a //

'// SmartMaster with content can be used for.//

Sub SMCStarted(Source As Document)

     MessageBox " You are about to use a SmartMaster with content as the basis" +_

                  "for your presentation page. "

End Sub


Example: Opened event
' Example: Opened event

'// In this example, a message box comes up when Freelance Graphics has just opened //

'//  a presentation (.prz) file.//

Sub Opened(Source As Document)

     MessageBox " The presentation is now open. "

End Sub


Example: PageCreated event
' Example: PageCreated event

'// In this example, a message box comes up when Freelance Graphics has created a new page.//

Sub PageCreated(Source As Page)

     MessageBox " A new page has just been created. "

End Sub


Deleted: Example: Quit event
' Example: Quit event

'// In this example, a message box comes up Freelance Graphics receives a //

'// command to shut down.//

Sub Quit(Source As Application)

     MessageBox " Freelance Graphics is about to shut down. "

End Sub


Example: SaveAs event
' Example: SaveAs event

'// In this example, a message box comes up when Freelance Graphics receives a command//

'// to save a presentation as a .PRZ file or as another file type.//

Sub SaveAs(Source As Document)

     MessageBox " Freelance Graphics is about to save the presentation " +_

                 "as a file type of your choice. "

End Sub


Example: SavedAs event
' Example: SavedAs event

'// In this example, a message box comes up when Freelance Graphics has saved //

'// a presentation as a .PRZ file or as another file type.//

Sub SavedAs(Source As Document)

     MessageBox " The presentation has been saved as the file type you chose. "

End Sub


Example: Saved event
' Example: Saved event

'// In this example, a message box comes up when Freelance Graphics has saved //

'// a presentation.//

Sub Saved(Source As Document)

     MessageBox " The presentation has been saved. "

End Sub


Example: Save event
' Example: Save event

'// In this example, a message box comes up when Freelance Graphics receives a command//

'// to save a presentation.//

Sub Save(Source As Document)

     MessageBox " Freelance Graphics is about to save this file. "

End Sub


Freelance Graphics: Activated event (Document)

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised each time Freelance Graphics has finished activating a presentation.

Syntax

Activated(Source As Document)

Parameters

Source As Document

Represents the active presentation as a Document object.

Usage

Use this event to run a script when Freelance Graphics has completed activating a presentation file (.PRZ).


Freelance Graphics: Activated event (Page)

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised each time Freelance Graphics has finished activating a page.

Syntax

Activated(Source As Page)

Parameters

Source As Page

Represents the activated page as a Page object.

Usage

Use this event to run a script when Freelance Graphics has completed activating a page. That page is now the current page.


Freelance Graphics: Clicked event

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised each time Freelance Graphics detects that a given placement block has been clicked.

Syntax

Clicked(Source As PlacementBlock)

Parameters

Source As PlacementBlock

Represents the clicked placement block as a PlacementBlock object.

Usage

Use this event to run a script whether a placement block has been clicked.


Freelance Graphics: PreClose event

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised each time Freelance Graphics receives an instruction to close the document (.PRZ file).

Syntax

PreClose(Source As Document)

Parameters

Source As Document

Represents the document to be closed as a Document object.

Usage

Use this event to run a script when Freelance Graphics receives a command to close a document.


Freelance Graphics: Created event (Document)

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised each time Freelance Graphics has finished creating a new presentation document (.PRZ file).

Syntax

Created(NewDocument As Document)

Parameters

NewDocument As Document

Represents the newly created presentation as a Document object.

Usage

Use this event to run a script when Freelance Graphics has created a document (presentation file). Note that although Freelance Graphics has created the document, it has not yet been named or saved.

Because a presentation (.PRZ) file inherits scripts from SmartMaster content files (.SMC), the most effective use of the Created event is when it is employed in a SmartMaster content (.SMC) file, it is meaningless in a .PRZ file.


Freelance Graphics: Created event (Page)

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised each time Freelance Graphics has finished creating a page.

Syntax

Created(Source As Page)

Parameters

Source As Page

Represents the newly created page as a Page object.

Usage

Use this event to run a script when Freelance Graphics has created a page.

Because a presentation (.PRZ) file inherits scripts from SmartMaster content files (.SMC), the most effective use of the Created event is when it is employed in a SmartMaster content (.SMC) file, it is meaningless in a .PRZ file.


Deleted: Freelance Graphics: DocumentCreated event
Freelance Graphics: DocumentCreated event

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised each time Freelance Graphics has finished creating a new document (presentation file).

Syntax

DocumentCreated(Source As Application, Pathname As String, NewDocument As Document)

Parameters

Source As Application

Represents the current application as an Application object.

Pathname As String

A string representing the path name of the new document. This parameter is always ignored because the document has not been named or saved yet, and therefore has no pathname.

NewDocument As Document

Represents the newly created document as a Document object.

Usage

Use this event to run a script when Freelacne Graphics has created a document (presentation file). Note that although the document has (presentation file) been created, it has not yet been named or saved.


Deleted: Freelance Graphics: DocumentOpened event
Freelance Graphics: DocumentOpened event

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised each time Freelance Graphics has finished opening an existing document (presentation file).

Syntax

DocumentOpened(Source As Application)

Parameters

Source As Application

Represents the current session of Freelance Graphics as an Application object.

CurrentDocument As Document

Represents the presentaiton file just opened as a Document object.

Usage

Use this event to run a script when Freelance Graphics has opened an existing presentation file.


Deleted: Freelance Graphics: DocumentOpen event
Freelance Graphics: DocumentOpen event

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised each time Freelance Graphics receives an instruction to open an existing document.

Syntax

DocumentOpen(Source As Application, Pathname As String)

Parameters

Source As Application

Represents the current session of Freelance Graphics as an Application object.

Pathname As String

A string representing the full name (including path) of the document about to be opened.

Usage

Use this event to run a script when Freelance Graphics receives a command to open an existing document.


Freelance Graphics: SMCStarted event

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised each time Freelance Graphics uses a SmartMaster content topic as the basis for a presentation page.

Syntax

SMCStarted(Source as Document)

Parameters

Source As Document

Represents the active document as a Document object.

Usage

Use this event to run a script when Freelance Graphics receives a command to use a content topic for a presentation. This event is triggered when the user chooses File - New and selects a SmartMaster with content, or when the user switches over from not using a SmartMaster content topic to using a SmartMaster content topic by choosing Presentation - SmartMaster Content - Select a Topic.


Freelance Graphics: Opened event

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised each time Freelance Graphics has finished opening an existing presentation file.

Syntax

Open(Source As Document)

Parameters

Source As Document

Represents the just opened presentation file as a Document object.

Usage

Use this event to run a script when Freelance Graphics has opened a presentation.


Freelance Graphics: PageCreated event

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised each time Freelance Graphics has finished creating a page.

Syntax

PageCreated(Source As Page)

Parameters

Source As page

Represents the newly created page as a Page object.

Usage

Use this event to run a script when Freelance Graphics has created a page.


Deleted: Freelance Graphics: Quit event
Freelance Graphics: Quit event

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raises each time Freelance Graphics receives an instruction to end the current Freelance Graphics application session.

Syntax

Quit(Source As Application)

Parameters

Source As Application

Represents the about to be closed Freelance Graphics session as an Application object.

Usage

Use this event to run a script when Freelance Graphics receives a command to exit, that is, shut down.


Freelance Graphics: SaveAs event

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised just before Freelance Graphics writes to another file type (such as a .BMP file) or as a presentation (.PRZ) file.

Syntax

SaveAs(Source As Document)

Parameters

Source as Document

Represents the presentation to be saved as a Document object.

Usage

Use this event to run a script when the user chooses File - Save As and saves the presentation as a .PRZ file or as as another file type (such as a .BMP file). The event is raised  just before Freelance Graphics actually writes the file.


Freelance Graphics: SavedAs event

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised each time Freeelance Graphics has finished saving a presentation as a presentation (.PRZ) file or as another file type.

Syntax

SavedAs(Source As Document)

Parameters

Source As Document

Represents the presentation just saved as a Document object.

Usage

Use this event to run a script when the user chooses File - Save As and saves the presentation as a .PRZ file or as as another file type (such as a .BMP file). The event is raised when Freelance Graphics has finished writing to a file.


Freelance Graphics: Saved event

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised when Freelance Graphics has finished saving a presentation (.PRZ) file.

Syntax

Saved(Source As Document)

Parameters

Source As Document

Represents the presentation that has just been saved as a Document object.

Usage

Use this event to run a script when the user chooses File - Save. The event is raised after Freelance Graphics has finished writing the file.


Freelance Graphics: Save event

 See list of classes

 See example

Available only in Freelance Graphics 97.

Raised each time Freelance Graphics receives an instruction to save a presentation and just before Freelance Graphics actually writes to the file.

Syntax

Save(Source As Document)

Parameters

Source As Document

Represents the presentation about to be saved as a Document object.

Usage

Use this event to run a script when the user chooses File - Save. The event is raised just before Freelance Graphics writes to the file.


Freelance Graphics LotusScript Events A-Z

A

Activated event (Document)

Activated event (Page)

B

(None)

C

Clicked event

Created event (Document)

Created event (Page)

D, E, F,G,H,  I, J, K, L, M, N

(None)

O

Opened event

P

PageCreated event

PreClose event

Q, R

(None)

S

SaveAs event

SavedAs event

Saved event

Save event

SMCStarted event

T, U, V, W, X, Y, Z

(None)


Developing SmartSuite Applications

Developing SmartSuite Applications Using LotusScript is available in the SmartSuite CD package as an online book. To install Developing SmartSuite Applications Using LotusScript, see the SmartSuite installation instructions.

To order a printed version of Developing SmartSuite Applications Using LotusScript and other LotusScript user assistance in the SmartSuite 97 Application Developer's Documentation Set, complete the order form and return it to Lotus.


Order Form for the SmartSuite 97 Application Developer's Documentation Set

The SmartSuite Application Developer's Documentation Set provides the following LotusScript programming manuals:

•	Developing SmartSuite Applications Using LotusScript is a comprehensive introduction to developing applications for SmartSuite 97. It offers chapters on key programming concepts, using LotusScript programming tools, programming individual SmartSuite products, developing cross-product scripts, and integrating scripts with Notes.

Note	These manuals are available only in English.

•	LotusScript Language Reference provides a comprehensive summary of conventions and basic commands for the LotusScript language. LotusScript Language Reference provides the foundation for programming any product that supports the LotusScript programming language.

•	The LotusScript Programmer's Guide describes the basic building blocks for LotusScript applications and provides many working examples.

These books are available in the CD-ROM version of your SmartSuite package as Online Books and available for viewing on Lotus' World Wide Web site (http://www.lotus.com). Should you want to order printed versions, simply fill out this form and send it to the appropriate office.

Please send me (1) free copy of the SmartSuite 97 Application Developer's Documentation Set. I understand that I must pay a shipping and handling fee. Please allow 4 - 6 weeks for delivery.

Name 	________________________________________________________________

Company 	________________________________________________________________

Address 1 (no PO boxes please) _______________________________________________

Address 2  _________________________________________________________________

City __________________________  State/Province _______________________________

Zip/Postal Code ____________   Phone ( ____ ) _____ - _________ ext. ______

Payment Method:    Visa / Mastercard / Amex / Check  (circle one)

Card Number ________________________  Exp Date ________ / _____

Signature ___________________________________________________

If paying by check, please mail this card with your check, payable to Lotus Development Corporation, in a sealed envelope.

See the Lotus World Wide Web home page or the back cover of Getting the Most Out of LotusScript in SmartSuite 97 for details on mailing addresses and shipping and handling charges.


LotusScript Documentation as Online Books

If you have purchased the CD-ROM version SmartSuite 97, you can use SmartSuite Install to install the following Online Books about LotusScript:

•	Getting the Most Out of LotusScript in SmartSuite 97

•	Developing SmartSuite Applications Using LotusScript

•	LotusScript Language Reference

•	LotusScript Programmer's Guide

For more information about installing Online Books, see your SmartSuite 97 installation documentation.


LotusScript Documentation on the Web

You can view updated versions of LotusScript documentation or download updated sample applications or Help files from the LotusScript home page.

If you have configured Windows to launch your Web browser automatically when you click a URL on your desktop, you can click the following button to go to the LotusScript home page.

 Click to access the LotusScript home page

If you have not configured Windows to launch your Web browser automatically, enter the following URL in the location field in your browser and press ENTER:

http://www.lotus.com/smartsuite/sslotusscript.htm


Overview: Designing SmartSuite Applications

LotusScript provides a variety of tools and services to support you in developing applications for SmartSuite. Getting productive in a new programming environment often involves understanding how all the pieces work together -- the tools, the language conventions, the object dependencies, and so on. Understanding how to approach the problem and where to enter your script code is half the challenge in learning.

Choosing a place to begin

Lotus Notes, 1-2-3, Approach, Freelance Graphics, and Word Pro all use the same underlying LotusScript language. Each product implements LotusObjects on top of the LotusScript language. To determine which product best supports the goals for your script application, consider using each of the SmartSuite products and reviewing its features. Read Developing SmartSuite Applications Using LotusScript for overviews of what each product can bring to your programming effort. Implement a couple of simple procedures in each of the products to get a feel for its features and objects. In the long run, you'll be better able to determine which product provides strengths where you need them most and how you can develop cross-product applications that take advantage of the strengths of each product.

Working the basics

LotusScript applications share the following common features.

•	You need a Lotus product to run script applications.

•	You need a Lotus product to store scripts in a product document such as a 1-2-3 workbook or Word Pro document.

•	You need to run the Lotus Integrated Development Environment (IDE) to edit and debug scripts stored in a product document.

•	You need to open an IDE window for each product document containing scripts that you want to modify.

To write a basic script application, therefore, you must run a Lotus product and load a document in that product. You can then write scripts for the product objects that you have created in your product.

Writing scripts in the Integrated Development Environment (IDE)

Your primary tool for developing script applications is the Lotus Integrated Development Environment (IDE). Beyond providing the basic tools such as an editor, a debugger, a browser, and a dialog editor, the IDE provides a high degree of integration with each Lotus product. It is easy to move between tasks that you perform in a product and those that you perform in the IDE.

Writing global scripts

Global scripts make declarations, options, and procedures available to all scripts in your document. For example, to write global scripts for a 1-2-3 document named LSAPP2.123, you must first run 1-2-3, load the document LSAPP2.123, and then open an IDE window for that document. Choose Edit - Scripts & Macros - Show Script Editor in the 1-2-3 menu to activate an IDE window for your current document.

The IDE lists objects that you can script in the Object list and scripts for each of those objects in the Script list. You can add statements to predefined scripts in (Globals) such as (Options), (Declarations), Initialize, or Terminate or you can create your own named procedures. You do not need to modify predefined scripts to write a basic script application.

The following illustration shows how to select a particular script for (Globals).

Click any item in the following list to learn more about it.

Product document   (Options) scripts   (Declarations) scripts	Initialize and Terminate subs   User-defined procedures
Writing scripts for product objects

You can also write scripts for product objects in your document. As with (Globals), you can add statements in the predefined scripts for an object or create new procedures for that object. Unlike scripts that you write in (Globals), the declarations, options statements, and procedures that you write for a product object are not generally available to scripts attached to a different product object.

The predefined scripts for product objects include object event procedures. Script statements in an object event procedure are executed when an object such as a button receives a particular event in your product such as its being clicked, double-clicked, or moved. For example, if you have added a button named Button 5 to the 1-2-3 document LSAPP2.123 and you want it to run some script when you click it, you must add script statements to the Click procedure for Button 5. To select this event procedure, choose the Button 5 object in the IDE Object list and choose Click in the Script list.

The following illustration shows how to select a predefined or user-defined script for a 1-2-3 product object named Button 5.

Click any item in the following list to learn more about it.

User-defined procedures   (Options) scripts   (Declarations) scripts	Event procedures   Initialize and Terminate subs
Working with external script files

In many cases, the one-application-per-document approach is sufficient for working with objects and data in isolated documents. To develop more sophisticated applications that reuse important scripts or use multiple products, you should consider using the following types of external script files:

LotusScript Script (LSS) files

LotusScript Object (LSO) files

LotusScript Extension (LSX) files

OLE Custom Control (OCX) files

Dynamic-link Library (DLL) files


Dynamic-link Library (DLL) files

If you have developed useful functions in C and compiled them in a Dynamic-link Library (DLL), you can call them from your LotusScript application. For example, the following procedure declares and calls a LotusScript function named SendDLL corresponding to a C function named _SendExportedRoutine in the DLL file named MYEXPORTS.DLL.

Declare Function SendDLL Lib _

   "C:\LOTUS\ADDINS\MYEXPORTS.DLL" _

   Alias "_SendExportedRoutine" (i1 As Long, i2 As Long)

SendDLL(5, 10)

For more information on using Dynamic-link Libraries, see LotusScript Language Reference.


(Declarations) scripts in (Globals)

The (Declarations) script is designed to contain the following statements:

•	Dim statements for variables that you want to be available to all scripts in your document

•	Public, Private, Type, Class, and Declare Lib statements (external C calls)

•	Const statements for those constants that you want to be available to all scripts in your document and are not needed for Use or UseLSX statements in (Options)

By default the (Declarations) script is initially empty.

If you enter Type, Class, or Declare Lib statements in any other script in (Globals), the IDE moves them to (Declarations) automatically. If you enter Dim, Public, Private, or Const statements outside the scope of a procedure in another script, the IDE moves them to (Declarations) automatically. Const statements in (Options) are the exception to this rule.


Initialize and Terminate subs in (Globals)

Initialize script

Use the Initialize sub in (Globals) to initialize variables that you have declared in (Declarations). The Initialize sub executes before any of these variables are accessed and before any other scripts in (Globals) are executed. By default, the Initialize script is empty.

Terminate script

Use the Terminate sub in (Globals) to clean up variables that you have declared in (Declarations) when you close your document or when you modify a script and execute it again. For example, you might use an Open statement to open a file containing data in Initialize and use a Close statement in Terminate to close it. By default, the Terminate script is empty.


(Options) scripts in (Globals)

The (Options) script in (Globals) is designed to contain these the following statements:

•	Option statements

Note	(Options) contains the statement Option Public by default. This makes Const, Dim, Type, Class, Sub, Function, and Property statements public by default. You can use the Public form of these statements to make them public explicitly or the Private form to make them unavailable to other scripts outside (Globals).

•	Deftype statements

•	Use and UseLSX statements

•	Const statements needed for Use and UseLSX statements

If you enter any of these statements, except for Const, in any other script in (Globals), the IDE automatically moves them to (Options).

Option and Deftype statements that you enter in (Options) apply only to scripts for the current object. To make certain that an option is applied consistently throughout your document, enter the appropriate statement in the (Options) script for every object for which you are writing scripts.


User-defined procedures in (Globals)

While you are working in (Globals), you can add procedures to make them available throughout your document. There are three ways to add procedures to (Globals) in the IDE:

•	Using the IDE menu: Choose Create - New Sub or Create - New Function in the IDE menu to create new subs and functions in (Globals). The IDE automatically adds the name of the new procedure to the Script list.

•	Entering statements: Enter a Sub, Function, or Property statement anywhere in (Globals) except within a class. The IDE automatically adds the name of the new procedure to the Script list for (Globals).

•	Importing procedures from a file: Use File - Import Script in the IDE menu to import scripts when you are working in (Globals). These imported scripts will be available to all scripts in your document. The IDE automatically adds the name of any new procedures contained in the imported script to the Script list.


LotusScript User Assistance for SmartSuite 97

To help you learn how to develop LotusScript applications for SmartSuite 97, Lotus provides a complete library of user assistance.

Getting the Most Out of LotusScript in SmartSuite 97

This publication explains how SmartSuite 97 products use the LotusScript programming language and how your business can take advantage of LotusScript in developing applications for SmartSuite.

Getting the Most Out of LotusScript in SmartSuite 97 is available in hardcopy, Adobe Acrobat, or HTML formats in your SmartSuite 97 package, in the SmartSuite Application Developer's Documentation Set, or on the Worldwide Web.

Developing SmartSuite Applications Using LotusScript

This publication provides comprehensive information on key concepts and techniques for developing LotusScript applications. Developing SmartSuite Applications Using LotusScript focuses on programming tools, cross-application programming, Notes integration, and product-specific application development.

Developing SmartSuite Applications Using LotusScript is available in hardcopy, Adobe Acrobat, or HTML formats in your SmartSuite 97 package, in the SmartSuite Application Developer's Documentation Set, or on the Worldwide Web.

LotusScript Language Reference

This publication provides a comprehensive summary of conventions and basic commands for the LotusScript language. LotusScript Language Reference provides the foundation for programming any product that supports the LotusScript programming language.

LotusScript Language Reference is available in hardcopy, Adobe Acrobat, Help, or HTML formats in your SmartSuite 97 package, in the SmartSuite Application Developer's Documentation Set, or on the Worldwide Web.

LotusScript Programmer's Guide

This publication is a general introduction to LotusScript that describes basic building blocks in the language and explains how to use them to create powerful applications.

LotusScript Programmer's Guide is available in hardcopy, Adobe Acrobat, or HTML formats in your SmartSuite 97 package, in the SmartSuite Application Developer's Documentation Set, or on the Worldwide Web.

Class Reference Help and Frequently-asked Questions

Each product provides comprehensive Help on product classes, frequently-asked questions about programming, and code examples. All this is delivered in an innovative Help system designed to enhance your work as a programmer.

Class reference Help and frequently-asked questions are available in Help format in your SmartSuite package or in HTML format on the Worldwide Web.

Example code and sample applications

Most products also provide working code to illustrate important programming techniques. You can reuse and modify this code as you develop your own applications.

Example code is available in the SmartSuite package and on the  Worldwide Web.


LotusScript Object (LSO) files

LotusScript Object (LSO) files contain public definitions that you can use in your script applications. If you develop a library of commonly-used declarations or procedures that you want to reuse across multiple script applications, you can collect them in a product document and use the File - Export Globals as LSO menu command to create a compiled LotusScript Object file. If this file were named WKREPORT.LSO, you would make these public definitions available to your script application by entering the following statement in the appropriate (Options) script:

Use "C:\LOTUS\ADDINS\WKREPORT.LSO"

For more information on using LotusScript Object files, see LotusScript Language Reference.


LotusScript Script (LSS) files

LotusScript Script (LSS) files are text files that contain LotusScript statements. You can create LSS files in any text editor. Use the %Include directive anywhere in a script to reference the contents of an LSS file. For example, to include the contents of a LotusScript Script file named STDSETUP.LSS in your application, enter the following statement:

%Include "C:\MYSCRIPTS\STDSETUP.LSS"

By default, LotusScript assumes that the LotusScript Script files that you reference have an LSS file extension. You can actually use any extension for your text file or no extension at all.

For more information on using LotusScript Script files, see LotusScript Language Reference.


LotusScript Extension (LSX) files

LotusScript Extension (LSX) files are Dynamic-link Libraries (DLLs) that contain public class definitions. LSX files are developed using with the Lotus LSX Toolkit. To obtain a version of the LSX Toolkit for your operating system, connect to the Lotus home page on the WorldWide Web. Lotus ships LSX files for Notes and Approach; other LSX files are being developed for SmartSuite products by Lotus and by third-party developers. These extension files expand the range of classes that you can use in your LotusScript applications.

Tip	You can enter a UseLSX statement in any script; the IDE automatically moves it to (Options).

Loading and using class definitions in LSX files

There are two ways to load and use the public class definitions in an LSX file.

•	If the LSX file that you want to load is not registered in the Windows Registry, you must refer to the LSX file directly in your UseLSX statement.

UseLSX "C:\MYSCRIPTS\LSX4DB2.DLL"

•	If an LSX is registered and you want to reference a class definition directly, you can enter the name of the class definition.

UseLSX "ObjectName"

In this example, LotusScript searches all entries under "LotusScriptExtensions" in the Windows Registry for the specified class definition and loads that definition.

Note	If the LSX file you want to load is registered in the Windows Registry, you can reference its Registry name and have Windows provide the appropriate DLL name and file path. SmartSuite 97 registers an LSX file that contains Notes public class definitions. To use these Notes class definitions in your cross-product script applications, enter the following statement:

UseLSX "*Notes"

Viewing class definitions

Once you have run a script containing a UseLSX statement and loaded an LSX file, you can browse its class definitions in the IDE Browser panel.

For more information on using LotusScript Extension files, see LotusScript Language Reference.


(Declaration) scripts in object scripts

The (Declarations) script for an object is designed to contain the following statements:

•	Dim statements for variables that you want to be available to all scripts for the current object

•	Const statements for those constants that you want to be available to all scripts for the current object and that are not needed for Use or UseLSX statements in (Options)

By default the (Declarations) script is initially empty.


Event procedures in object scripts

If you are writing a script for an object, the Script list displays default event procedures for the selected object. In the IDE you cannot create new event procedures for an existing product object because valid events for that object are defined by the product.


Initialize and Terminate subs in object scripts

Initialize sub

Use the Initialize sub to set up variables declared in the object's (Declarations) script. The Initialize sub for an object executes before any of its event procedures. By default, the Initialize script is empty.

Note	Scripts for controls created in the Lotus Dialog Editor do not have Initialize subs.

Terminate sub

Use the Terminate sub to clean up variables that you have declared in the object's (Declarations) script. By default the Terminate script is empty.

Note	Scripts for controls created in the Lotus Dialog Editor do not have Terminate subs.


(Options) scripts in object scripts

The (Options) script for an object is designed to contain these the following statements:

•	Option statements

•	Deftype statements

•	Use and UseLSX statements

•	Const statements needed for Use and UseLSX statements


User-defined procedures in object scripts

You can create other named subs, functions, and properties for objects in addition to the predefined scripts or event procedures. Because these procedures are not in (Globals), they can be called only from other scripts for the object.

There are three ways to create object scripts in the IDE:

•	Using the IDE menu: Use Create - New Sub and Create - New Function to create new subs and functions for an object. The IDE automatically adds the name of the new procedure to the Script list for that object.

•	Entering statements: Enter a Sub, Function, or Property statement anywhere in a script for the current object. The IDE automatically adds the name of the new procedure to the Script list for that object.

•	Importing procedures from a file: Use File - Import Script when you are working with object scripts to import scripts for that object. The IDE automatically adds the name of any new procedures contained in the imported script to the Script list.


OLE Custom Control (OCX) files

OLE Custom Controls extend the number of objects that you can script in Lotus products. For example, the Lotus dialog controls listed under product classes in the IDE Browser panel are OCX controls that you can add to the Lotus Dialog Editor.

Once you have added an OCX control to your product, you can script its properties, methods, and events in the IDE Script Editor.

The following illustration shows how the properties, methods, and events of an Lotus CommandButton OCX named Command4 are available to you in the IDE.

Tip	You can add OCX controls registered on your system to the Lotus Dialog Editor Toolbox by choosing File - Toolbox Setup in the Lotus Dialog Editor menu.


Product Documents
Product Document

To edit scripts in the IDE or to execute them in one or more products, you must create or use a document in your product that contains the scripts. Lotus products supporting LotusScript use the following document extensions:

Lotus Product	Document extension(s)
1-2-3	123
Approach	APR
Freelance Graphics	SMC
Notes	NSF
Word Pro	LWP


Using LotusScript Examples

Code examples provide working models for the scripts that you write. Whether the example is listed in a Help example or available as a product document on disk, you can copy statements or entire scripts from the examples and use them in your own script applications.

There are three types of LotusScript examples, each designed to illustrate a different aspect of the LotusScript language or the classes available for each SmartSuite product.

Examples in reference Help

Most examples appear in reference Help for the LotusScript language and for product classes. These brief examples focus on individual elements in the language or members of a product class. They illustrate how to use correct syntax for a working example, how to enter appropriate values for parameters, and how dependencies between elements operate.

Note	Although you can copy examples from reference Help and paste them into your scripts, they are not designed primarily to be self-contained. Sometimes there are dependencies between a piece of example code and the larger sample application from which it is derived.

Examples in Frequently-asked Questions (FAQs) Help

Frequently-asked questions (FAQs) illustrate how to complete common programming tasks using LotusScript. Examples in FAQs not only illustrate how individual statements work, but they also illustrate how these statements form a complete application or procedure. Most examples in FAQs are designed to be self-sufficient; you can copy one or more procedures from Help, paste them into your own scripts in the Script Editor, and execute them.

Note	When there are dependencies in an example that would require you to modify the example to make it run, these dependencies are documented in the Help topic or at the beginning of the first script in the example.

Sample applications

The Developing SmartSuite Applications Using LotusScript book includes numerous sample applications for SmartSuite and for individual products. These examples are designed to illustrate more sophisticated tasks for an individual product or tasks that utilize more than one product. They illustrate how to develop script applications that take advantage of embedded OLE objects, OLE automation, Notes, Visual Basic, the Worldwide Web, and custom Dynamic-link libraries (DLLs). Lotus develops new sample applications for SmartSuite on an ongoing basis; these new samples and updated versions of the ones in Developing SmartSuite Applications Using LotusScript are available on the Worldwide Web.

To copy scripts from these sample applications and paste them into your own script applications, you must first open the sample application document and then display its scripts by opening the IDE window for that document.

Note	 All sample applications in Developing SmartSuite Applications Using LotusScript are designed to run without modification.


Using LotusScript Help

The design for LotusScript Help supports three of the most frequent activities that you perform as a programmer:

•	Searching for objects and elements to use in your scripts

•	Writing scripts

•	Debugging scripts

LotusScript Help uses different types of windows to display different types of information, so it is important to know what each type of window contains and how to navigate between them.

Using Help to search for objects and elements

There are areas in Help designed to help you search for objects and language elements to use in your scripts:

LotusScript Help Contents

You can use Contents in Help to examine the overall structure of Help and to browse for Help topics relevant to your current script.

LotusScript Index

Indexes are one of the most popular ways that programmers search for information. Topics in LotusScript Help are indexed alphabetically so you can enter key phrases or keywords and navigate to the corresponding Help topics.

LotusScript A - Z lists

LotusScript Help for each product provides A - Z lists of its classes, properties, methods, and events, including a comprehensive list of all the elements in the product.

IDE Browser Help

The Browser panel in the Integrated Development Environment (IDE) displays lists of LotusScript language elements and classes for products. You can expand and collapse entries in the Browser to view the associated properties, methods, and events for objects.

Highlight an element in the Browser panel and press F1 (HELP) to get context-sensitive Help on that element.

Using Help to write scripts

Help focuses on objects. As you are writing scripts, you explore the relationships between product classes and the behaviors of objects in that product.

Types of Help windows

To support this exploration, Help separates information about classes into four types of windows:

•	Class definition windows define what a class does in a product and how it works in the product's containment hierarchy. The class definition topic for the 1-2-3 Range object describes what ranges do in 1-2-3, how they are contained by larger objects, and how they contain smaller objects.

•	Class member list windows list all the properties, methods, and events that are members of a particular class.

•	Class member windows focus on particular properties, methods, or events.

•	Example windows contain one or more scripts for a particular property, method, or event. You can copy and paste script statements from these example windows into the IDE Script Editor.

Displaying Help windows

To display different types of LotusScript Help windows, use buttons in Help topics and in the Help window that are labeled by the type of Help window. The following illustration shows how to use buttons to display class member, class member list, and example windows in Help.

The following illustration shows how to display class definition and class member list windows in Help.

Help for editing and debugging scripts

You can also get context-sensitive Help about keywords and messages when you are editing or debugging your scripts in the IDE.

Context-sensitive Help in the Script Editor and Script Debugger

If you need help on a keyword while you are writing or debugging a script in the Script Editor and Script Debugger, place the insertion point on the keyword and press F1 (HELP) to get context-sensitive Help on that keyword.

Context-sensitive Help on messages

You can also get context-sensitive Help on two types of messages in the IDE. In the Script Editor, you can get context-sensitive Help on syntax errors. Navigate to the statement that caused the error and press F1 (HELP). When you are debugging your scripts and the IDE reports a run-time error, press F1 (HELP) to display information about that error and suggestions about fixing it.