Script objects

The following is a summary of the changes to scripting objects.

CloseListerData

The CloseListerData object has the following new properties:

You can use this to revert to the old behavior of not auto-saving Listers that close when the Synchronize or Duplicate File Finder panels are showing:

Script Type: VBScript

Function OnCloseLister(closeListerData)
If closeListerData.lister.utilpane = 1 Then
If closeListerData.lister.utilpage = "sync" Or closeListerData.lister.utilpage = "dupe" Then
closeListerData.prevent_save = True
End If
End If
End Function


Column

The Column object has the following new properties:

Command

Control

The Control object represents a control on a script dialog; it’s returned by the Dialog.Control method. It has the following methods and properties:

CustomFieldData

The CustomFieldData object is passed to a rename script’s OnGetNewName method via the GetNewNameData.custom property. If a rename script adds custom fields to the Rename dialog using OnGetCustomFields, this object lets you access the values the user provided for each field.

Dialog

The Dialog object has the following new properties and methods:

DialogListItem

The DialogListItem object is returned by the Control.GetItemAt and Control.GetItemByName methods. It represents an item in a combo or listbox control in a script dialog. It has the following properties:

DOpus

The DOpus object has the following changes:

DPI

The DPI object is returned via the DOpus.DPI property. It contains the following properties and methods:

Format

The Format object has the following new properties:

FSUtil

Item

The Item object has the following changes:

Lister

The Lister object has the following new property:

GetCopyQueueNameData

This object is passed to the new OnGetCopyQueueName event. It lets a script override the name of the automatically-generated copy queue. The properties are:

GetCustomFieldData

If a rename script implements the OnGetCustomFields method it will be passed a GetCustomField data object that it can use to add custom fields to the Rename dialog. The object contains the following properties:

GetNewNameData

The GetNewNameData object has the following new properties:

Msg

The Msg object represents a script dialog input event message. It’s returned by the Dialog.GetMsg method which you call when running the message loop for a detached dialog. It has the following properties:

Path

The Path object has the following changes:

Script

The Script object has the following new method:

ScriptColumn

ScriptColumnData

ScriptInitData

The ScriptInitData object has the following new properties:

ScriptStrings

The ScriptStrings object is returned by the DOpus.strings property. It lets you access any strings defined via string resources. It contains the following methods and properties:

ShellProperty

The ShellProperty object represents a shell property - an item of metadata for a file or folder that comes from Windows or third-party extensions (as opposed to metadata from Opus's native metadata system).

The FSUtil.GetShellPropertyList method lets you retrieve a list of available shell properties. You can then use FSUtil.GetShellProperty or Item.ShellProp to retrieve the value of a property for a particular file.

SortOrder

The SortOrder object is returned by the Format.manual_sort_order property if manual sort mode is active. It lets you query and modify the sort order. The object supports the following properties:

Tab

The Tab object has the following new property:

Viewer

The Viewer object represents a standalone image viewer. A collection of Viewer objects is returned by the Viewers object, which is obtainable via the DOpus.viewers property. As well as querying its properties, you can also use a Viewer object as the parameter for the Command.SetSourceTab method, which lets you run commands against a viewer window.

The Viewer object contains the following properties and methods:

Viewers

This object is obtained from the DOpus.viewers property. It represents all currently open standalone image viewers. It is a collection of Viewer objects and can be enumerated as such. It also has the following property:

 

ViewerEventData

This object is passed to the OnViewerEvent method, whenever certain events occur in a standalone image viewer.