• No results found

ELO OLE Automation Interface Description UK

N/A
N/A
Protected

Academic year: 2021

Share "ELO OLE Automation Interface Description UK"

Copied!
423
0
0

Loading.... (view fulltext now)

Full text

(1)

© 1998..2002 ELO Digital Office GmbH Page: 1

ELOprofessional - OLE Automation Interface

Structure and Application of the Automation Interface

The ELOoffice 2.1 DDE Interface has been replaced by a more modern and improved OLE Automation Interface with the professional version. It is now possible to send commands to ELO from outside, make entries or request information from ELO.

Script names can be allocated freely. They must only meet the rules for a file name. All script names starting with ELO are reserved for ELO Digital Office. You should not use these, as otherwise name conflicts may occur.

The OLE Automation Interface by ELO is very similar to the previous DDE interface. For this reason it cannot be called object oriented, but command oriented.

The interface is more or less identical for ELOoffice and ELOprofessional, however, not all functions are available under ELOoffice. When creating the objects it needs to be remembered that ELOoffice has another ID than ELOprofessional. For ELOoffice, the object must be created with the ID ELO.office instead of

ELO.professional. If you want to use the Automation Interface under ELOprofessional 2.5, you must use the ID LeitzElo.Elo32, ELOoffice 4.5 required the ID LeitzElo.Elo32o. The LeitzElo Ids are still valid for the program versions ELOprofessional 3.0 or 5.0 for compatibility reasons, but will be discarded in the next program version.

Important Information:

Please note the character of the OLE Automation Interface:

1. Easy and fast extendibility of the ELO client by additional functions

2. Highest possible upward compatibility between versions

These two main targets may result in the introduction of new Automation commands in the project within a short period of time, that are intended to execute one particular function only. Consequently, it is not guaranteed that each command is executable in each workview and in any combination with other commands. Due to the compatibility requirement, new client functions cannot always be introduced to the existing commands. In this case, either an xyz_EXT function is created or the functionality is not exported via the Automation Interface at all.

Please note also, that this interface is a Client-Interface. It’s not conceived for executing a large amount of actions. You should check before penetrating in border ranges, whether the OLE Interface meets your requests at all. Since here are many components involved on which we have no influence, we’re not able to offer you a work around at some limitations (e.g. memory leaks in the OLE Interface, in Windows Scripting Host or in the Compiler Run-time environment as well).

(2)

© 1998..2002 ELO Digital Office GmbH Page: 2

Table of Contents

ELOPROFESSIONAL - OLE AUTOMATION INTERFACE...1

Structure and Application of the Automation Interface...1

Important Information:...1

Table of Contents ...2

Extended System Settings...10

Under ELOprofessional 3.0, the following additional ID is available:...10

Additional IDs from Version 3.00.360 ...10

Separate Registry Information ...10

First Steps ...11

Starting ELO, Selecting Archive and Login Dialog ...11

Detecting the Currently Selected Entry...13

List of All Documents in the Accounting Cabinet, Invoice Folder, 1998 Tab ...13

Adding a New Document to the Tab ...13

Detecting the Mask (Document Type) Number from the Description...13

Adding a Mail with Text Body and File Attachment to the Archive ...14

Editing a Mask ...15

Reading a Color Value or the Entire Color Table...16

Requesting and Setting the Workview...17

Editing Postbox Content ...17

Scanning Documents Horizontally ...17

Finding Entries via the OLE Interface ...18

EloScript Example: Issuing an Access Path to the Currently Selected Object ...19

EloScript Example: Empty and Separator Page Check in the Postbox...19

Simple Form Management...20

Example: Before Editing a Self-Adhesive Note ...21

Example of a Microsoft WinWord 8 Macro ...22

Scripting within the Process Control ...24

"Entering/Moving an Object Reference" Script Event ...25

"When Checking a Document In/Out" Script Event...25

Editing the Subject Data Script Event...27

Before the Search Script Event ...27

Viewer Export Script Event ...27

Batch Scan Script Event...28

Collecting the Workflows Script Event (available from version 4.00.214 on)...29

Workflow Start and End Scripts ...32

Creating a Workflow Report when Terminating a Workflow ...32

HTML Subject Data View Script Event ...35

Example for a view of the short name and the first 11 index lines (if they are not empty): ...36

Special Script Events ...38

Freezing a Document (ELO_Freeze) ...38

Thesaurus (ELO_Thesaurus) ...38

Reminders/Workflow Notifications (ELO_OUTLOOK) ...39

Keyword Lists (ELO_BUZZLIST)...42

Automatic Action when Starting the Program (ELO_START) ...44

Project Default for Activities (ELO_CHECKPROJ)...44

Special Handling Upon New Storage of Documents...44

(3)

© 1998..2002 ELO Digital Office GmbH Page: 3

Own Reports ...45

Requesting Scripts ...46

Form Detection API...47

Overview...47

Commands of the Pattern Detection-API...47

Examples...47

Syntax of the format strings of the pattern detection ...53

Annotations...53

List of the Available OLE Functions...55

General Information about the Functions ...55

Property ActionKey (int, read only) ...56

Function ActivateFlow...58

Property ActivePostFile (AnsiString) ...59

Property ActiveUserId (int, read only) ...60

Property Activity (AnsiString)...61

Function AddAutoDlgControl (int, int, AnsiString, AnsiString)...62

Function AddLink...63 Function AddNote...64 Function AddNoteEx ...64 Function AddPostboxFile ...65 Function AddSignature ...66 Function AddSw ...67 Function AddThesaurus...68 Function AnalyzeFile...69

Property ArchiveDepth (int) ...70

Function ArcListLineId ...71

Function ArcListLineSelected ...72

Function AssignWorkflowUser (int) ...73

Property AttId (int) ...74

Property AutoDlgResult (AnsiString)...75

Function Backup (int, int, int)...76

Property BackupPath (AnsiString)...77

Function BringToFront ...78

Function ChangeObjAcl (int ObjId, AnsiString Acl, int Option)...79

Function CheckFile...80

Function CheckFileHash...81

Function CheckIn...82

Function CheckInEx ...82

Property CheckInOutFileName (AnsiString)...83

Property CheckInOutObjID (int) ...84

Function CheckObjAcl ...85 Function CheckOut ...86 Function CheckPage ...87 Function CheckUpdate...88 Function ClickOn...89 Function CloseActivateDocDlg ...90 Function CollectChildList...91 Function CollectLinks...92 Function CollectWv ...93

Property ColorInfo (int) ...94

Property ColorName (AnsiString) ...95

Property ColorNo (int)...96

Function ConfirmWorkflow ...97

Function ConfirmWorkflowEx...98

Function CreateAutoDlg (AnsiString Caption) ...99

(4)

© 1998..2002 ELO Digital Office GmbH Page: 4

Function CreateStructure (AnsiString Path, int StartID) ...101

Function CreateViewer ...102

Function DateToInt (AnsiString Date) ...103

Function DeleteFlow(int, int)...104

Function DeleteMask ...105 Function DebugOut...106 Function DeleteObj...107 Function DeleteProjectOptions...108 Function DeleteSwl...109 Function DeleteWv ...110 Function DeleteWvLine...111

Property DelOutlookName (AnsiString)...112

Function DoCheckInOut...113

Function DoCheckInOut2...114

Function DoCheckInOut3...115

Property DocId (int)...116

Property DocKey (int)...117

Property DocKind (int) ...118

Property DocPath (int) ...119

Property DocTPath (int)...120

Function DoEditObject ...121 Function DoEditObjectEx...121 Function DoExecute...122 Function DoExecuteEx ...123 Function DoFullTextSearch...124 Function DoInvisibleSearch...125 Function DoSearch...126

Function DoSearchSel (AnsiString)...126

Function DoSearchEx (AnsiString, int) ...126

Function DoSelArcTree ...127

Function EditActivity (AnsiString)...128

Property EditDlgActive (int)...129

Function EditWv (int WvId, int ParentId) ...130

Function EloWindow...131 Function Export ...132 Function FindFirstWv...133 Function FindFlowTemplate...134 Function FindNextWv ...135 Function FindUser ...136 Function FreezeDoc ...137 Function FromClipboard...138 Function GetArcName ...139 Function GetArchiveName ...140

Function GetAutoDlgValue (int Index) ...141

Function GetBarcode ...142 Function GetChildNode ...143 Function GetCookie ...144 Function GetCounter...145 Function GetCounterList...146 Function GetDocExt ...147 Function GetDocFromObj ...148 Function GetDocRefComment...149 Function GetDocumentExt ...150 Function GetDocumentOrientation...151 Function GetDocumentPath...152 Function GetDocumentPathName ...153 Function GetDocumentPathVersion ...154 Function GetDocumentSize ...155

(5)

© 1998..2002 ELO Digital Office GmbH Page: 5 Function GetEntryId ...156 Function GetEntryName ...157 Function GetGuidFromObj...158 Function GetHistDoc ...159 Function GetHistObj...160 Function GetIndexGroups...161 Function GetLastDocId...162

Function GetLastVersionTimeStamp (int, int)...163

Function GetListEntry...164 Function GetMD5Hash...165 Function GetNodeList...166 Function GetObjAttrib ...167 Function GetObjAttribFlags ...168 Function GetObjAttribKey ...169 Function GetObjAttribMax...170 Function GetObjAttribMin ...171 Function GetObjAttribName...172 Function GetObjAttribType...173 Function GetObjFromDoc ...174 Function GetObjFromDocEx...175 Function GetObjFromGuid...176 Function GetObjMaskNo...177

Function GetObjRef (int ObjId, int RefNo)...178

Function GetPopupObjectId ()...179

Function GetPostDir ...180

Function GetRegInfo ...181

Function GetScriptButton ...183

Function GetScriptEvent (AnsiString Event, int Mode) ...184

Function GetTreePath(int Mode, AnsiString Delimiter, int MaxLength)...185

Function GotoId...186

Function GotoPath ...187

Function GovAddInfo...188

Function GovDeleteRequest ...189

Property GovDueDate (AnsiString)...190

Function GovGetRequestId ...191

Function GovMoveRequest ...192

Property GovObjId (int)...193

Property GovOwner (int) ...194

Property GovReqDate (AnsiString) ...195

Property GovReqId (int) ...196

Property GovReqPrio (int)...197

Property GovReqStatus (int)...198

Function GovRequestList ...199

Function GovRequestNext...200

Property GovRetDate (AnsiString)...201

Property GovSender (int)...202

Function Import ...203 Function ImportScript...204 Function ImportWorkflow ...205 Function InsertDocAttachment ...206 Function InsertDocAttachmentEx...207 Function InsertProjectOptions ...208 Function InsertRef ...210

Function InsertVTRep(int, int, AnsiString) ...211

Function IntToDate...212

Property IsWfLine(int)...213

Function LoadPostImg...214

(6)

© 1998..2002 ELO Digital Office GmbH Page: 6

Function LockObject ...216

Function Login...217

Property LookupDelimiter (AnsiString) ...218

Function LookupDocType ...219

Function LookupHistMD5Ext ...220

Function LookupHistMD5 (deprecated)...220

Function LookupIndex...221

Function LookupKeyName...222

Function LookupMaskName...223

Function LookupUserName...224

Property MaskFlags (int) ...225

Property MaskKey (int) ...226

Property MaxResultSet(int) ...227

Function MergeImages ...228

Function MergeImagesEx ...228

Function MergePostPages...229

Property MinDocLevel (int)...230

Function MovePostboxFile...231

Function MovePostboxFile2...231

Function MoveToArchive...232

Function MoveToArchiveEx ...232

Function NextActivity (AnsiString)...233

Property NodeAction (int) ...235

Property NodeActivateDate (AnsiString) ...236

Property NodeActivateScript (AnsiString) ...237

Property NodeAlertWait (int) ...238

Property NodeAllowActivate (int)...239

Property NodeAvailable (int)...240

Property NodeComment (AnsiString)...241

Property NodeDepartment (int) ...242

Property NodeFlowId (int)...243

Property NodeFlowName (AnsiString) ...244

Property NodeId (int)...245

Property NodeName (AnsiString)...246

Property NodeObjectID (int) ...247

Property NodeTerminateDate (AnsiString) ...248

Property NodeTerminateScript (AnsiString) ...249

Property NodeType (int) ...250

Property NodeUser (int)...251

Property NodeYesNoCondition (AnsiString) ...252

Property NoteOwner(int) ...253

Property NoteText (AnsiString)...254

Property NoteType(int)...255

Property ObjAcl (AnsiString) ...256

Property ObjBarcodeInfo(AnsiString)...257

Property ObjFlags (int) ...258

Property ObjGuid (AnsiString)...259

Property ObjIDate (AnsiString)...260

Property ObjIndex (AnsiString)...261

Property ObjInfo (int) ...262

Property ObjKey (int) ...263

Property ObjLock(int) read only...264

Property ObjMainParent (int) ...265

Property ObjMaskNo (int) ...266

Property ObjMemo (AnsiString) ...267

Property ObjMemoInfo (AnsiString)...268

Property ObjMName (AnsiString)...269

(7)

© 1998..2002 ELO Digital Office GmbH Page: 7

Property ObjSDate (AnsiString), ObjSIDate, ObjSVDate ...271

Property ObjSReg (AnsiString) ...272

Property ObjShort (AnsiString) ...273

Property ObjStatus (int) ...274

Property ObjType (int), ObjTypeEx (int) ...275

Property ObjVDate (AnsiString) ...276

Property ObjXDate (AnsiString) ...277

Function OcrAddRect ...278

Function OcrAnalyze and OcrAnalyzeEx...279

Function OcrClearRect ...280

Function OcrGetPattern ...281

Function OcrGetText ...282

Function OcrPattern ...283

Property OfficeMaskNo (AnsiString)...284

Property OkEnabled (int)...285

Function OpenChildNodes...286

Property (AnsiString) OpenSave (int value)...287

Function (AnsiString) OpenSaveDialog (int Type) ...289

Function OrientFile...290

Property OutlookName (AnsiString) ...291

Function PostBoxLineSelected ...292

Function PrepareObject, PrepareObjectEx ...293

Function PrepareReplSet...295

Function PromoteAcl ...297

Property PrintDocListTabs (int Nr) ...299

Function PrintDocument...300

Function QueryOption ...301

Function QueryReplSet...302

Function ReadActivity (AnsiString) ...303

Function ReadBarcodes ...304

Function ReadColorInfo ...305

Function ReadKey (int)...306

Function ReadObjMask ...307

Function ReadSwl...308

Function ReadUser...309

Function ReadUserProperty...310

Function ReadWFNode(int, int, int, int) ...311

Function ReadWv ...312

Function ReloadWv ...313

Function RemoveDocs(int, AnsiString, int)...314

Function RemoveRef (int, int) ...315

Function RotateFile...316

Function RunEloScript...317

Function SaveDocumentPage ...318

Function SaveDocumentZoomed...319

Function SaveObject...320

Property ScriptActionKey (int)...321

Property SearchListColumns ( AnsiString ) ...322

Function SearchListLineId...323 Function SearchListLineSelected...324 Function SelectAllPostBoxLines ...325 Function SelectArcListLine ...326 Function SelectCurrentNode...327 Function SelectLine ...328 Function SelectNode...329 Function SelectPostBoxLine...330 Function SelectPostBoxLineEx ...330 Function SelectRootNode ...331

(8)

© 1998..2002 ELO Digital Office GmbH Page: 8 Function SelectSearchListLine ...332 Function SelectTreePath ...333 Function SelectUser ...334 Function SelectUserEx...334 Function SelectView...335 Function SelectWorkArea...336 Function SelList ...337 Function SeparateTiffFile ...338 Function SetCookie...339 Function SetObjAttrib...340 Function SetObjAttribFlags ...341 Function SetObjAttribKey ...342 Function SetObjAttribMax ...343 Function SetObjAttribMin ...344 Function SetObjAttribName ...345 Function SetObjAttribType...346 Function SetOption ...347 Function SetReplSet...348 Function SetScriptButton...349 Function SetScriptEvent ...350 Function SetScriptMenu ...352

Function ShowActivities (int,AnsiString)...353

Function ShowAutoDlg ()...354

Function ShowDocInverted ...355

Property SigId (int) ...356

Function Sleep ...357 Function SortSearchList...358 Function SplitFileName ...359 Function StartFlow...360 Function StartFlowEx ...361 Function StartScan ...362 Function Status...363 Function StoreDirect...364 Function StoreKeyword ...365 Function StoreMulti ...366 Function ToClipboard...367 Function TreeWalk ...368 Function UnselectAllPostBoxLines...370 Function UnselectArcListLine...371 Function UnselectLine ...372 Function UnselectPostBoxLine...373 Function UnselectSearchListLine ...374

Function UpdateDocument, UpdateDocumentEx...375

Function UpdateObject ...376

Function UpdatePostbox...377

Function UpdatePostboxEx ...378

Function UpdateReplSet ...379

Property UserFlags (int)...380

Property UserGroup (int) ...381

Property UserGroups (AnsiString) ...382

Property UserId (int) ...383

Property UserKeys (AnsiString) ...384

Property UserName (AnsiString)...385

Property UserParent (int) ...386

Property UserTerminate (AnsiString)...387

Function Version...388

Property ViewFileName (String) ...389

(9)

© 1998..2002 ELO Digital Office GmbH Page: 9

Property WFFlowName (AnsiString) ...391

Property WFName (AnsiString) ...392

Property WFOwner (AnsiString)...393

Property WindowState (int) ...394

Function WriteActivity (AnsiString) ...395

Function WriteColorInfo ...396

Function WriteKey (int KeyNo, AnsiString KeyName)...397

Function WriteObjMask ...398

Function WriteUser...399

Function WriteUserProperty...400

Function WriteWv ...402

Property WvCreateDate (AnsiString) ...403

Property WvDate (AnsiString) ...404

Property WvDesc (AnsiString) ...405

Property WvDueDate (AnsiString)...406

Property WvIdent (int)...407

Function WvListInvalidate ()...408

Property WvNew (int)...409

Property WvParent (int)...410

Property WvParentType (int), WvParentTypeEx (int) ...411

Property WvPrio (int) ...412

Property WvShort (AnsiString) ...413

Property WvUserFrom (int)...414

Property WvUserOwner (int)...415

Appendix...416

(10)

© 1998..2002 ELO Digital Office GmbH Page: 10

Extended System Settings

Under ELOprofessional 3.0, the following additional ID is available:

The ELO object is only simply available, several CreateObject requests trigger off the same program instance to be accessed. In order to be able to use two ELOprofessional versions per scripting at the same time (e.g. for script-controlled transfer between two different archives), the following procedure needs to be followed:

1. A copy of the ELO32.EXE client to ELO32D.EXE is created (precisely this name!).

2. The ELO32D.EXE program is requested once, it then registers in the OLE runtime system under the ID

"ELO.professional2"

3. Scripts that want to work with this instance use the "ELO.professional2" ID for CreateObject instead of

or in addition to "ELO.professional".

Additional IDs from Version 3.00.360

• Apart from the ELO32D.EXE version, you can now additionally create ELO32E.EXE, ELO32F.EXE

and ELO32G.EXE.

• These programs then answer to ELO.professional2 (ELO32D.EXE), ELO.professional3

(ELO32E.EXE), ELO.professional4 (ELO32F.EXE), and ELO.professional5 (ELO32G.EXE). You can now use separate program allocations for different script tasks. For example, if you have written a series of extensions for a help desk function and another group of scripts for automatic e-mail storage in another archive, you can use the two applications (up to 4) via this extension.

Separate Registry Information

If you want to work with different archives from one workplace, you can do so to a certain extent with the profiles. For this purpose, you can automatically switch the settings for AccessManager and database login during program start. However, there are a large number of settings that are not part of the profiles, but must be switched in practice. These are for example ScriptEvents, button allocations, and preset storage masks. This is especially annoying if you want to work in the different areas at the same time. For this reason, from version 3.00.360 there is a possibility to operate the clients completely with their own registry branches.

1. As described above, create program copies ELO32D.EXE, ELO32E.EXE, ELO32F.EXE and

ELO32G.EXE (naturally only as many as you actually need).

2. Copy the registry branches HKCU\Software\ELO Digital\ELO32.1 und HKLM\Software\ELO

Digital\ELO32.1 to ...\ELO32D.1 (or \ELO32E.1, \ELO32F.1 and \ELO32G.1). If required, adjust the database, server and AccessManager settings.

3. When you start an ELO32x.EXE program version, it first requests from the registry whether there is a

branch ...\Software\ELO Digital\ELO32x.1. If it exists, it is used, if it does not exist, the default branch ...\Software\ELO Digital\ELO32.1 is used.

(11)

© 1998..2002 ELO Digital Office GmbH Page: 11

First Steps

The following sections provide an overview of ELO Automation Interface programming. The examples focus on the required steps, no error log is carried out.

From version 3.0 onwards you have the opportunity to record all automation accesses in one file. This is a practical extension for the script creation. However, this new function is rendered special importance in case of malfunctions or when controlling completed components, whose interior structure cannot be viewed. The report is switched on via the Options dialog:

Starting ELO, Selecting Archive and Login Dialog

In general, there are two different scenarios for ELO remote control:

1. A user works with ELO and you want to carry out actions in the work area of this user via your

application. In this case no login is required, it has already been carried out by the user. You then only need to check in your application whether ELO is already active.

2. You have an independent process (e.g. automatic fax or mail transfer). In this case the application

has to carry out a login (and a logout at the end). Login to ELO for case 1:

// Start ELOprofessional ... try

{

(12)

© 1998..2002 ELO Digital Office GmbH Page: 12 }

catch (...) {

// ELOprofessional must have been called at least once // at the workplace - it then registers

// automatically as OLE Automation Server return;

};

// First of all, you should make sure that // a user is actually logged in.

ObjId=EloServer.OleFunction("GetEntryId",-1); if (ObjId==-1)

{

// error: no work area active, i.e.

// ELO is started, but no user is logged in return;

};

Login to ELO for case 2:

// Start ELOprofessional ... try { EloServer= CreateOleObject("ELO.professional"); } catch (...) {

// ELOprofessional must have been called at least once // at the workplace - it then registers

// automatically as OLE Automation Server return; }; // check version iOleResult=EloServer.OleFunction("Version"); if (iOleResult<101002) {

// version is smaller than 1.01.002 // too old! EloServer.OleFunction("Login","LOGOUT","",""); EloServer=NULL; return; }; // System login

iOleResult=EloServer.OleFunction("Login", Login name, password, archive); if (iOleResult<0)

{

// Unknown login name, password or archive EloServer.OleFunction("Login","LOGOUT","",""); EloServer=NULL;

};

Logoff ELO for case 2:

// Log off from archive and exit ELO again EloServer.OleFunction("Login","LOGOUT","",""); EloServer=NULL;

(13)

© 1998..2002 ELO Digital Office GmbH Page: 13

Detecting the Currently Selected Entry

With the GetEntryId function, you can request the currently selected entry, GetEntry then supplies you with the appropriate name.

ObjectId=EloServer.OleFunction("GetEntryId",-1);

ObjectShort=EloServer.OleFunction("GetEntryName",ObjectId);

List of All Documents in the Accounting Cabinet, Invoice Folder, 1998 Tab

First of all, the ObjectId of the 1998 tab in the invoices folder in the accounting cabinet is detected with LookupIndex. After switching to the tab, all documents can be requested.

// First of all find the tab

RegisterId=EloServer.OleFunction("LookupIndex",

"¿Accounting¿Invoice¿1998"); if (RegisterId>0)

{

// now request the tab found

EloServer.OleFunction ("GotoId",0-RegisterId); // ... and request the documents in the tab for (i=0; i<10000; i++)

{

DocumentId=EloServer.OleFunction("GetEntryID",i); if (DocumentId<1) break;

// here the document is added to a list };

};

Adding a New Document to the Tab

In order to add a new document, first of all an empty input must be prepared, the subject data are to be added, and the image file must be transferred to the user postbox with AddToPostbox. This entry can then be added to the archive.

// prepare empty data set and add to it

EloServer.OleFunction("PrepareObject",0,4,0);

EloServer.OlePropertySet("ObjShort","Holiday in Florida"); EloServer.OlePropertySet("ObjMemo","Ford Home in Naples"); EloServer.OlePropertySet("ObjFlags",2);

// add to the postbox

iOleResult=EloServer.OleFunction("AddPostboxFile", "c:\temp\ford.tif"); // and transfer to archive from the postbox

sDestInfo="¿Holiday 98¿Florida West Coast¿Ford Meyers"; iOleResult=EloServer.OleFunction("MoveToArchive",sDestInfo);

(14)

© 1998..2002 ELO Digital Office GmbH Page: 14 If you want to add a document to the archive, you must first determine the document type. ELO works internally with mask numbers in this case, the real world with descriptions. In order to convert the description into a mask number, you have to browse through the available masks and compare with the description.

int __fastcall TMailImpMainDlg::FindEloMailMask() { AnsiString sTmp; int iEloMask; iEloMask=0; for (iEloMask=0;iEloMask<MAX_MASKNO;iEloMask++) { if (EloServer.OleFunction("ReadObjMask",iEloMask)>=0) { sTmp=EloServer.OlePropertyGet("ObjMName"); if (sTmp.UpperCase()=="ELOMAIL") { return iEloMask; }; }; }; return -1; };

It will be simpler from version 1.01.048 with the LookupMaskName function. The function described above is reduced to one request:

iEloMask=EloServer.LookupMaskName("ELOMAIL");

Adding a Mail with Text Body and File Attachment to the Archive

The following example shows how an e-mail is automatically added to the archive. For this purpose, the e-mail is first checked in, the subject, sender and recipient are evaluated and the body and the file attachment

are saved. The basic information and the file names are then transferred to the InsertIntoELO function. bool __fastcall TMailImpMainDlg::InsertIntoElo(int iMailMask, const AnsiString sDestination, const AnsiString sSubject, const AnsiString sFrom, const AnsiString sTo,

const AnsiString sMailText, const AnsiString sMailAttchment) {

int iOleResult,iObjId;

EloServer.OleFunction("PrepareObject",0,4,iMailMask); EloServer.OlePropertySet("ObjShort",sSubject);

EloServer.OlePropertySet("ObjFlags",1); // version controlled if (iMailMask>0)

{

// the EloMail mask has two

// additional entries: sender and recipient EloServer.OleFunction("SetObjAttrib",0,sFrom); EloServer.OleFunction("SetObjAttrib",1,sTo); };

iOleResult=EloServer.OleFunction("AddPostboxFile",sMailText); // if no archive target is available,

(15)

© 1998..2002 ELO Digital Office GmbH Page: 15 // the mail remains in the postbox

if (iOleResult>0 && sDestination!="") {

iOleResult=EloServer.OleFunction("MoveToArchive", sDestination); // here the new ObjectId is detected ...

iObjId=EloServer.OleFunction("GetEntryId",-2); if (iOleResult>0)

{

// ... and the file attachment is carried out.

iOleResult=EloServer.OleFunction("InsertDocAttachment", iObjId,sMailAttachment); }; }; return iOleResult>0; };

Editing a Mask

With the ReadObjMask and WriteObjMask commands you can read document type information and save it again. The following values are available as document type information:

ObjMName Mask name

ObjMIndex Target information for automatic storage MaskFlags Bit ...

MaskKey Mask key

DocKey Default value for document key DocKind Default value for document color DocPath Document storage path

DocTPath Default value for the storage path

In addition there are 50 attribute lines (0..49) available. Each attribute line has the following values: Get/SetObjAttrib() User entry, e.g. an invoice number

Get/SetObjAttribName() Description of the field in the mask, e.g. "Invoice number" Get/SetObjAttribKey() Index description in the database, e.g. "INVNO"

Get/SetObjAttribType() 0: Text, 1: Date, 2: Numerical

Get/SetObjAttribMin() Minimum input length in digits, 0: No control Get/SetObjAttribMax() Maximum input length in digits, 0: No control

The ObjAttrib field is irrelevant for definition of an input mask, it is not stored at this point, as it will only record the user input at a later stage when creating documents.

The differentiation of ObjAttribName and ObjAttribKey is carried out for three reasons:

• If different language versions need to cooperate, a suitable text (e.g. "Rechnungsnummer" and "Invoice

No.") can be displayed in the input masks. However, the same key is used database-internal in both cases (e.g. "INVNO").

• A mask can contain several of the same fields. For example, a "Book" input mask can contain several lines

on the authors (author, co-author etc.). All these lines can then be added to the same key (e.g. author) database-internally and thus they can all be considered during the search.

• Different masks can contain similar fields. An invoice contains the "Client name" field, a delivery note

contains the "Supplier name" field. Both fields can contain the internal "Name" database key and can thus be triggered directly during the search.

Please note that the minimum and maximum input refers to the number of digits and not (not even for numerical fields) to the input value.

(16)

© 1998..2002 ELO Digital Office GmbH Page: 16 Index lines 0..49 are available for the subject data fields. This is followed by 10 lines that are reserved for ELO-internal tasks. Line 50 contains the link information at present. For this purpose, the index line is allocated the group description ELO_XLINK in the AttribName field and a 12-digit random character string in the Field value.

The following is a short example for creating a new mask: NEWMASK=9999

Set Elo=CreateObject("ELO.professional") if Elo.ReadObjMask(NEWMASK)<0 then

MsgBox "Error while preparing mask" else

Elo.ObjMName="ELO test mask" Elo.MaskFlags=25

' one index line, input length 5..10 digits call Elo.SetObjAttribName(0, "Index 1") call Elo.SetObjAttribKey(0, "IDX1") call Elo.SetObjAttribMin(0, 5) call Elo.SetObjAttribMax(0, 10) x=Elo.WriteObjMask()

if x<0 then

MsgBox "Error no. " & x & " when creating new mask." else

MsgBox "New mask with number " & Elo.ObjMaskNo & " created." end if

end if

Reading a Color Value or the Entire Color Table

For reading color values, the ReadColorInfo function and the ColorInfo and ColorName properties are available. iOleResult=EloServer.OleFunction("ReadColorInfo",MyColorNumber); if (iOleResult>0) { MyColorRGB=EloServer.OlePropertyGet("ColorInfo"); MyColorName=EloServer.OlePropertyGet("ColorName"); };

For detecting the complete color table, a special form of ReadColorInfo is available. If you set the 0x8000 bit in the color number while reading, the function reads the desired color or if it is not available, the next highest color number. MyColorNumber=0; for (;;) { MyColorNumber=MyColorNumber|0x8000; iOleResult= EloServer.OleFunction("ReadColorInfo",MyColorNumber); if (iOleResult<0) break; MyColorNumber= EloServer.OlePropertyGet("ColorNo"); // Now edit the current color value here

MyColorNumber++; };

(17)

© 1998..2002 ELO Digital Office GmbH Page: 17

Requesting and Setting the Workview

For requesting or setting the current workview, the SelectView function is available. When you request this function with the 0 parameter, you receive the number of the currently set worksheet (1..5) as return value. If you use one of the values 1…5, the selected view is displayed.

// Request current status

ActView=EloServer.OleFunction("SelectView",0); if (ActView!=3)

{

// is not set to the postbox -> switch EloServer.OleFunction("SelectView",3); };

Editing Postbox Content

The following example illustrates how an external program or an ELO scripting macro can search the postbox and edit the available entries.

In this example, all entries are loaded and the selected entries are appended by the term "Important" in the memo field, the non-selected entries by the term "Unimportant".

for (iPostLine=0;i<1000;i++) // observe a maximum of 1000 entries {

// first of all, load the desired line

iRes=EloServer.OleFunction("PrepareObject",-1,iPostLine,0) switch (iRes)

{

case –5: continue; // no subject data available

case -7: continue; // no subject data available

case -6: return true; // finished, no further entries case 3: sText="Important"; break;

case 4: sText="Unimportant"; break;

default: return false; // something went wrong };

// Read content of the memo field, add additional text and back sText=EloServer.OlePropertyGet("ObjMemo")+sText;

EloServer.OlePropertySet("ObjMemo",sText); // save changed dataset again

EloServer.OleFunction("AddPostboxFile",""); };

Scanning Documents Horizontally

Many feed scanners can only scan A4 documents in longitudinal direction. If a number of documents need to be scanned horizontally, the user must intervene for every single document. This process can be automated with a simple script. Create a new script with the following content:

Set Elo=CreateObject("ELO.professional") res=Elo.RotateFile("",90)

(18)

© 1998..2002 ELO Digital Office GmbH Page: 18 This script can also easily be extended so that it searches the complete post list for selected entries and rotates them accordingly. This way it can then be placed onto a user-free button and a larger group of documents can thus be rotated at the same time.

Finding Entries via the OLE Interface

This example is based on the following scenario:

In a company, delivery notes are printed with barcode. These delivery notes are then appended with notes by hand and cannot be directly transferred via COLD for this reason. Instead they are scanned in again and stored in the archive via the barcode component.

In the example, the ELO documents are then to be checked regularly from the order management (has the delivery note been scanned in the meantime?) and additional information is to be entered. The storage mask for the delivery notes contains a line "Delivery note number – DLNO", which is entered via the barcode component and the lines "Customer number – CTNO" and "Delivery date – DLDAT", which are appended from the order management.

As preparation for the subsequent lines, the application must create an EloServer object and determine the mask with the name "Delivery notes" from the masks list (iLfMaskNo).

First of all, the order management has to browse all delivery notes that are still open – for each delivery note the following routine is then requested (please note that a "real" routine should contain respective error checks, which have been removed hear for reasons of clarity):

bool AddInfo(AnsiString sDlno, AnsiString sCtno, AnsiString sDldat) { EloServer.OleFunction("PrepareObject",0,0,iLfMaskNo); EloServer.OleFunction("SetObjAttrib",0,sDlno); iCnt=EloServer.OleFunction("DoSearch"); switch (iCnt) { case -1: // error return false;

case 0: // not found return false;

case 1: // found – enter now break;

default: // Multiple entries, must be dealt with somehow // e.g. all entries are appended.

return false; }; iObjId=EloServer.OleFunction("GetEntryId",0) EloServer.OleFunction("PrepareObject",iObjId,4,iLfMaskNo); EloServer.OleFunction("SetObjAttrib",1,sCtno); EloServer.OlePropertySet("ObjXDate",sDldat); EloServer.OleFunction("UpdateObject"); return true; }

As a consequence of the function request, the order management then only has to issue an error message or append its internal database with the information that the comparison could be carried out successfully. This procedure has the advantage that a control is given whether all delivery notes have been scanned in again, and the data that are available in the system anyway (customer number, date) do not need to be manually processed further.

(19)

© 1998..2002 ELO Digital Office GmbH Page: 19

EloScript Example: Issuing an Access Path to the Currently Selected Object

Set Elo=CreateObject("ELO.professional") STemp=""

id=Elo.GetEntryId(-1)

ires=Elo.PrepareObject(id,0,0) STemp=Elo.ObjShort

while ires=2 and Elo.ObjMainParent>1

ires=Elo.PrepareObject(Elo.ObjMainParent,0,0) STemp=Elo.ObjShort & " : " & STemp

wend

MsgBox "Access path: " &STemp

EloScript Example: Empty and Separator Page Check in the Postbox

' TestPage.VBS 10.10.2001

'--- ' © 2001 ELO Digital Office GmbH

' Author: M.Thiele ([email protected])

'--- ' This script checks all entries in the postbox for empty

' or separator pages. If an empty page (at least 97% white content ' in each segment) was found, it is additionally checked how ' "empty" it is and the respective value is issued.

' --- set Elo = CreateObject("ELO.professional")

ver=Elo.Version if ver<300220 then

MsgBox "This script requires at least version ELOprofessional 3.00.220" else

' Browse all postbox entries, but a maximum of 100 for i=0 to 100

' Select the entry in the viewer if Elo.SelectLine(i)<0 then exit for

end if

' Checks for separator and empty page at the same time res=Elo.CheckPage(3, 970)

if res=1 or res=3 then

' is an empty page, now determine limit value for j=970 to 999

if Elo.CheckPage(1,j)=0 then exit for

end if next

sTmp=sTmp & " [ IsWhite: " & j/10.0 & " % ] " end if

' add separator text

(20)

© 1998..2002 ELO Digital Office GmbH Page: 20 ' Add file name to message

sPathName=Elo.ActivePostFile

sName=Elo.SplitFileName(sPathName, 2) sTmp=sTmp & " : " &sName & vbcrlf

' carries out a ProcessMessages internally, that’s all Elo.UpdatePostboxEx 23,1

' Takes the SelectLine back Elo.UnselectPostboxLine(i) next

' Display result in a MessageBox. MsgBox sTmp

End if

Simple Form Management

The following example browses the postlist, takes each selected example and browses a defined section for the keywords "Invoice" and "Delivery note" via the OCR software. If one of these keywords is found, it reads the related mask definition and browses additional sections of the form for invoice number, customer number etc. These entries are then saved with the document and added to the archive.

' The program reads all selected entries of the postbox and

' checks whether the document belongs to the "invoice" or "Delivery note" ' mask type. The respective data of the mask lines are then checked out from the ' form and saved.

' Afterwards, the document is moved to the archive.

set ELO = CreateObject("ELO.professional") iNum=0

Do while (1)

iRet=Elo.PrepareObject (-1,iNum,0) If (iRet = -6) Then

MsgBox "Program finished!" Exit Do

End If

if (iRet = 3 Or iRet = -7) Then ' Only edit selected documents. SaveObjShort=Elo.ObjShort ELo.ObjShort="" iRet=Elo.AddPostBoxFile("") strLine="#"+CStr(iNum) res=Elo.AnalyzeFile(strLine,"R(333,100,666,200)P(1)S(SHORT=1,100)",0) If (res = 1) Then obs=Trim(Elo.ObjShort) i=1

do while i<= len(obs) if mid(obs,i,1)=" " then obs=mid(obs,1,i-1)+mid(obs,i+1,Len(obs)-i) end if i=i+1 loop If (InStr(obs,"Invoice")>0) then

(21)

© 1998..2002 ELO Digital Office GmbH Page: 21 res=Elo.AnalyzeFile(strLine,"R(600,100,1000,200) P(1) S(InvNo=1,10) R(450,180,1000,220) P(1) S(CtNo=1,10) R(450,220,1000,260) P(1) S(Locrt=1,10) ",6) If (res = 1) Then InvNo=Elo.GetObjAttrib(0) iRet=Elo.PrepareObject (-1,iNum,0) ELo.ObjShort=ELo.ObjShort+InvNo iRet=Elo.AddPostBoxFile("") ObjIndex="REG=Invoice" iRet=Elo.MoveToArchive (ObjIndex) if (iRet <> 1) then

msgbox "Error during transfer, RetValue = " & Cstr(iRet) End If

End If Else

If (InStr(Elo.ObjShort,"Delivery note")>0) then

res=Elo.Status("Delivery note in line " & strLine & " detected.") res=Elo.AnalyzeFile(strLine,"R(600,100,1000,200) P(1)

S(DlNo=1,10) R(500,180,1000,220) P(1) S(CtNo=1,10) R(500,220,1000,260) P(1) S(Product=1,10) R(500,260,1000,320) P(1) S(Storage location=1,50) ",7) SupplyNo=Elo.GetObjAttrib(0) iRet=Elo.PrepareObject (-1,iNum,0) ELo.ObjShort=ELo.ObjShort+SupplyNo iRet=Elo.AddPostBoxFile("") ObjIndex="REG=Delivery note" iRet=Elo.MoveToArchive (ObjIndex) if (iRet <> 1) then

msgbox "Error during transfer, RetValue = " & Cstr(iRet) End If

Else

res=Elo.Status("Unknown document in " & strLine) If SaveObjShort="" then Elo.ObjShort="Unknown document" Else Elo.ObjShort=SaveObjShort End If iRet=Elo.AddPostBoxFile("") End If End If Else

res=Elo.Status("Document type could not be checked in line " & strLine) If SaveObjShort="" then Elo.ObjShort="Unknown document" Else Elo.ObjShort=SaveObjShort End If iRet=Elo.AddPostBoxFile("") End If End If iNum=iNum+1 Loop res=Elo.UpdatePostbox()

Example: Before Editing a Self-Adhesive Note

When editing a self-adhesive note, the name and time are automatically entered into the text field. The

ScriptActionKey parameter contains values 1: before the request, 2: after the request, completed with Ok and 3: after the request, completed with Cancel.

(22)

© 1998..2002 ELO Digital Office GmbH Page: 22 if Elo.ScriptActionKey=1 then

note=Elo.NoteText if note<>"" then

note=note & vbcrlf & vbcrlf & "====" & vbcrlf end if

Elo.ReadUser(Elo.ActiveUserId)

note=note & Date & Time & ": " & Elo.UserName & vbcrlf & "----" & vbcrlf Elo.NoteText=note

end if

Example of a Microsoft WinWord 8 Macro

The following lines contain an example for the automatic transfer of a document from WinWord to ELO using a macro.

Public Sub MAIN()

TempDir$ = Environ("TEMP") ' Temporary directory of environmental variables

If Documents.Count < 1 Then ' If no document open

MsgBox ("Transfer is not possible, as no document was opened") GoTo ENDE

End If

If Tasks.Exists("The electronic Leitz folder") = False Then ' if ELO is not active ->

GoTo StartEloProgram ' Message that ELO must be started

End If

i = 1 ' Possible Temp file names "WW_ELOi.doc"

Loop: ' detect which does not exist in window list

For j = 1 To Application.Windows.Count ' Examine for all opened windows

If Application.Windows(j).Caption="WW_ELO"+LTrim(Str(i))+".doc" Then i = i + 1 ' next temporary file name "WW_ELOi.doc" GoTo loop ' find in window list

End If Next j

TempName$ = "WW_ELO" + LTrim(Str(i)) + ".doc"

If Dir(ActiveDocument.FullName) <> "" Then ' Was document saved before ?

If ActiveDocument.Saved = False Then ' Saved, but was changed

MsgText$ = "Document was changed and receives temporary file name: " + TempName$ + Chr$(13) + Chr$(10)

File name$ = TempDir$ + "\" + TempName$ ActiveDocument.SaveAs FileName:=File name$

Else ' is saved and was not changed

MsgText$ = "" ' no indication that document only exists temporarily File name$ = ActiveDocument.FullName ' File name+path (copies original file)

End If

Else ' Document is a new document

MsgText$ = "Caution: The document is not yet saved and receives the temporary file name: " + TempName$ + Chr$(13) + Chr$(10)

File name$ = TempDir$ + "\" + TempName$ ' set temporary file name

ActiveDocument.SaveAs FileName:=File name$ ' save under temporary file name End If

ShortName = ActiveDocument.BuiltInDocumentProperties("Title")

If ShortName = "" Then ' if no title entered, it receives

ShortName = ActiveDocument.Name ' document name as short name

End If

Com = ActiveDocument.BuiltInDocumentProperties("Comments") ' Copy comment

DDate$ = ActiveDocument.BuiltInDocumentProperties("Last Save Time") DDate$ = DateValue(DDate$) ' Determines valid date: dd.mm.yy Dim ELOServer As Object

Set ELOServer = CreateObject("ELO.professional") ' ELO32 OLE-Server On Error GoTo LOGIN ' ELO is in Login dialog

iOleResult = ELOServer.PrepareObject(0, 4, 0) ' new entry, document, standard

On Error GoTo 0

ELOServer.ObjMemo = Com ' Document comment

ELOServer.ObjXDate = DDate$ ' last storage date

EntryID = ELOServer.GetEntryID(-12) ' >0 -> There is an enabled tab

If (ELOServer.SelectView(0) = 1) And (EntryID > 0) Then ' ELO is found in "Archive + Tab"

txt = MsgText$ + Chr$(13) + Chr$(10) + "The document is saved in the archive under the following short name."

ShortName = InputBox(txt, "ELOprofessional document transfer", ShortName) ' Short name can be changed via

ELOServer.ObjShort = ShortName ' dialog

iOleResult = ELOServer.AddPostboxFile(File name$) ' first of all into postbox, iOleResult = ELOServer.MoveToArchive("#" + Str(EntryID)) ' then into archive

(23)

© 1998..2002 ELO Digital Office GmbH Page: 23 Else ' otherwise transfer into postbox

txt = MsgText$ + Chr$(13) + Chr$(10) + "The document is saved in the postbox under the following short name."

ELOServer.ObjShort = InputBox(txt, "ELOprofessional document transfer", ShortName) iOleResult = ELOServer.AddPostboxFile(File name$) ' transfer to postbox

End If

Set ELOServer = Nothing ' release server object again

GoTo END LOGIN:

Set ELOServer = Nothing ' release server object again MsgBox ("Error: You must login under ELOprofessional.")

GoTo END

StartEloProgram:

MsgBox ("Error: ELOprofessional must be enabled for transfer.") END:

(24)

© 1998..2002 ELO Digital Office GmbH Page: 24

Scripting within the Process Control

Within the process control two scripts can be allocated to each node, which are automatically processed at each activation or termination of a node respectively. Within such a script the data of the current node can be accessed, for this purpose, the properties

NodeAction, NodeActivateScript, NodeAlertWait, NodeAvailable, NodeComment, NodeFlowName, NodeName, NodeTerminateScript, NodeType, NodeUser and NodeYesNoCondition are available (for description of individual properties, see below).

Before these properties are accessed, the NodeAvailable property must be checked. For a value of 1, information is available on a node, otherwise no information is available. If the script is requested manually for example, i.e. not within the context of a process, there is no information available on a node. In this case the NodeAvailable property has the value 0.

Caution: When forwarding a workflow activity, first of all the entire workflow is checked into the document including the ELO index information. Afterwards, the required steps are executed in the workflow including the respective scripts. if you change the index information in one of the scripts, the new data are not yet visible within this step. This can be especially critical for branch nodes. If the branching occurs due to the "AMOUNT" field, and this field is changed before branching in the end script of the node, this new value will not included in the decision making process. If this should be necessary, however, the group name of the respective field must be preceded by an exclamation mark in the decision node. This informs the workflow that it has to check out the respective field directly from the database and not from the internal data.

Example script that accesses the data of a node: CRLF=Chr(13)&Chr(10)

Set Elo=CreateObject("ELO.professional") If Elo.NodeAvailable=1 Then

FlowTxt="Name of process: "&Elo.NodeFlowName Select Case Elo.NodeType

Case 1 NTxt="Start node" Case 2 NTxt="Person"

Case 3 NTxt="Division node" Case 4 NTxt="Decision node" Case 5 NTxt="Collective node" End Select if Elo.NodeAction=1 Then NTxt=NTxt&" enabled." Else NTxt=NTxt&" terminated." End If NTxt="Action: "&NTxt

NameTxt="Name of node: "&Elo.NodeName CommentTxt="Comment: "&Elo.NodeComment If Elo.NodeType=4 Then ConditionTxt="Condition: "&Elo.NodeYesNoCondition Else ConditionTxt="" End If

ActivateTxt="Script when activating: "&Elo.NodeActivateScript TerminateTxt="Script when terminating: "&Elo.NodeTerminateScript MsgBox FlowTxt&CRLF&NTxt&CRLF&NameTxt&CRLF&KommentarTxt&CRLF_ &ConditionTxt&CRLF&ActivateTxt&CRLF&TerminateTxt End If

If the active node is a distribution node, the script can control to which successor the document is to be forwarded. Such a script is entered in the End Script field of a (distribution) node:

(25)

© 1998..2002 ELO Digital Office GmbH Page: 25 Set Elo=CreateObject("ELO.professional")

ObjID=Elo.NodeObjectID 'Access to the data...

Elo.PrepareObject ObjID,0,0 '...of the document being processed MsgBox Elo.ObjShort

Rv=Elo.OpenChildNodes 'Open access to the subsequent nodes If Rv=1 Then

Do

rv=Elo.GetChildNode 'Read subsequent node... If (rv>0) Then '...available for

If Elo.NodeUser=3 Then 'Only user no. 3 receives the document... Elo.NodeAllowActivate=1

Else '...none of the others

Elo.NodeAllowActivate=0 End If

End If

Loop Until rv<0

Elo.SelectCurrentNode 'Switch back to current node End If

"Entering/Moving an Object Reference" Script Event

With the "When entering/moving an object reference" script event you can react when a user moves a document or a storage structure element within the archive. Here, one could make adjustments for example within the authorization structure or the subject data.

Set Elo=CreateObject("ELO.professional") ObjectId=Elo.NodeAction

ParentId=Elo.ScriptActionKey NewParent=Elo.WvNew

if Elo.ActionKey=1 then

MsgBox "AddRef ObjId=" & ObjectId & " Parent: " & ParentId else

MsgBox "MoveRef ObjId=" & ObjectId & " OldParent: " & _ ParentId & " NewParent: " & NewParent

end if

Via the action key, you can detect if an object is inserted new (1), copied (2) or moved (3). The additional parameters like ObjectId and Predecessor can be determined via the OLE interface. This request is only activated if the moving/inserting is carried out directly via the client. If the operation was enabled via the OLE interface, this ScriptEvent is not triggered.

This script event is available from version 3.00.584, respectively 4.00.182 .

"When Checking a Document In/Out" Script Event

With this script event, you receive notifications on documents to be registered in or out at various times. The individual times are specified via the ActionKey, the following values are available for this (values 1001 … 1005 are only available from version 5.00.020 on):

Value Action

30 After checking out a document, but before activating the application for processing. The CheckInOutFileName property contains the file name.

With the ScriptActionKey property you can be informed whether a document is created out of a document template directly in the archive view; in this case the Bit 8 (value = 256) is set to 1. Moreover this property contains information, if the document shall be activated afterwards by

(26)

© 1998..2002 ELO Digital Office GmbH Page: 26 ShellExecute. 0: don’t activate, 1: activate without demand, 2: activate with demand. You can also change this value in the script and thus change the planed view type.

31 Immediately before checking in a document. The CheckInOutFileName property contains the name of the file to be checked in.

32 After checking in the document. The CheckInOutFileName property contains the name of the file to be checked in, this will be deleted immediately after the event.

33 Before checking out a document. The CheckInOutObjID property contains the ELO ObjectId of the document to be checked out.

With the ScriptActionKey property you can determine if ELO is to continue with normal processing after the script request. If you leave the property unchanged at 1, the procedure is continued. If you enter the value 14, ELO assumes that you have completed the checkout procedure via the script and no further actions are necessary. All other values also cancel the processing and actuate a respective message box.

34 Before checking in a document. The CheckInOutFileName property contains the name of the file to be checked in.

With the ScriptActionKey property you can determine if ELO is to continue with normal editing after the script request. If you leave the property unchanged at 1, the procedure is continued. If you enter the value 14, ELO assumes that you have completed the checkin procedure via the script and no further actions are necessary. All other values also cancel the processing and actuate a

respective message box.

1001 Before the view of a file list for a register-checkout oder –checkin procedure. This event is requested for every file, the file name is in the CheckInOutFileName property, the

CheckInOutObjId contains the ELO ObjectId. The ScriptActionKey property contains the information, how the procedure is planed (bottom 8 bit), if a checkin (0x200) or a checkout (0x100) procedure is active. Besides the bit 0x10000000 is set. If this bit is set to 0 by the script event, this file is not included in the view list.

Caution: this script event is possibly requested several in one procedure – e.g. if the user changes an option in the dialog and the view list is built up again for this reason.

1002 Before checking out a document from the register list. The further parameters are set like in event 1001. Is the ScriptActionKey Bit 0x10000000 is set back to 0 the checkout procedure for this document is suppressed.

1003 After checking out a document from the register list.

1004 Before checking in a document from the register list. The further parameters are set like in event 1001. If the ScriptActionKey Bit 0x10000000 is set back to 0, the checkout procedure for this document is suppressed.

1005 After checking in a document from the register list. Example: SET Elo=CreateObject("ELO.professional") if Elo.ActionKey=33 then Id=Elo.CheckInOutObjID Ext=UCase(Elo.GetDocExt(Id, 1)) if Ext="MSG" then

MsgBox "E-mails cannot be checked out" Elo.ScriptActionKey=14 end if end if if Elo.ActionKey=34 then File=Elo.CheckInOutFileName Ext=UCase(Right(File,3)) if Ext="TIF" then

(27)

© 1998..2002 ELO Digital Office GmbH Page: 27 Elo.ScriptActionKey=14

end if end if

Editing the Subject Data Script Event

This script event contains a collection of actions, which are differentiated by the ActionKey. While starting the subject data dialog it is first of all questioned which index line shall get an user-defined button (24). Afterwards the message to the start of editing the subject data follows. Every entering or leaving an index line triggers off a notification as well, changing the document type too. When finished editing the subject data an event is triggered off one more time.

To fade in own action buttons at the end of an index line, the event 24 has to be served. This event expects a vector with a list of all buttons in the TextParam property as return. This vector consinsts of up to 54 ‘0’ and ‘1’ values, each entry is responsible for one index line. The first character stands for the short name, the second for the fulltext entry in the search dialog, the following 2 are reserved for extensions and the last 50 are for the 50 index lines. So, if you need a button on the short name and the 2. and 4. index line, you have to enter the value 10000101 in TextParam (only necessary until the last 1, all zeros at the end can be left out).

If a user activates such a button, you receive in this event an ActionKey value 3xxx, the first index line 3000, the next 3001. The short name provides a value 3999. Take care of the additional offset, which is entered when the mask in the search view is requested.

Normally the buttons as a function of the active document mask are used in different ways. For this reason the interrogation for the display vector comes up not only at the start of the display but additionally at every change of the document type.

Before the Search Script Event

The Before the Search script event allows to change the SQL search inquiry before it is sent to the SQL server. Thereby th SQL command is delivered in the TextParam property and changes caused by the script are taken over by Elo from there.

Please note, that this script is activated at every search, also at intern searches (e.g. for the link list). So, you have to check before changing an search inquiry, if the wanted inquiry is active.

Viewer Export Script Event

With the "Viewer Export" script event you can intervene in the export process in several places. The different times can be identified with the ActionKey properties. The target directory for the viewer can be checked out in the ActivePostFile property. On the other hand, you can cancel the action prematurely via the ScriptActionKey property. As long as you leave this value unchanged at 1, the process is continued, if you enter a 0 via your script, it is cancelled.

"Time" 2 is favorable for copying keyword lists. Under ELOprofessional 3.0, here you can execute the commands for copying the desired keyword lists. Under 4.0, this can also be manually configured by the user. However, you can also replace the user request with your own control via respective script settings.

ActionKey Time

1 Before the copy process of the viewer data. If you cancel here, you get the same status as if the viewer had not been selected in the first place.

2 After copying the viewer data and before starting viewer import. If you cancel at this point, you have the general viewer files, but your export dataset is not checked in.

(28)

© 1998..2002 ELO Digital Office GmbH Page: 28 3 After starting the viewer. Please note that at this moment, the actual import process in the viewer is

not yet completed. Unfortunately there is no easy way to determine this time via script.

4 (From ELOprofessional 4.0) Before copying a keyword list, the file name and path can be found in the ActivePostFile property. If you set the ScriptActionKey to 0, this file is not copied with the others. Through this you can control (if the user has enabled copying of the keyword lists) which lists are actually included in the copying process.

Example:

Set Elo=CreateObject("ELO.professional")

MsgBox Elo.ActionKey & " : " & Elo.ActivePostFile

Batch Scan Script Event

The Batch Scan script event is activated from different positions. About this you have an influence on the clipped documents, the non-clipped documents and the actual storage process. The document for the batch storage is defined by the postbox function “preset storage mask” (as with the barcode storage). The normal storage target is defined here as well, so the mask must have a storage index.

This event is available from version 4.00.042 on. ActionKey=1: Filing in the archive

This request comes off for each (already clipped) document immediately before the filing. The ActivePostFile property points at the file to scan, MainParentId at the planed target, the other subject data referred properties (e.g. short name, index lines) are already loaded as well. With the script you can make any changes in the subject data at this time. Additionally the target can be changed.

The possibilities of this request also include an completely script controlled storage. In this case the script is responsible for the actual storage process and the deleting of the data and subject data file. The client signals this case with setting the SciptActionKey property to a value unequal to 0.

ActionKey=2: Pre-processing

After the scan process a barcode analysis is automatically performed (if a barcode is defined for the document mask). Next a decision over start- and continuation pages of the documents is reached. Via default each page with a barcode is a start page, all others are continuation pages. The script request is executed thereby for all pages. By setting the DocKind property the script can make own divisions.

ActionKey=3: Before clipping

This request is sent before clipping. It comes off, when the user wants to transfer the documents in the archive via “A” or “S”.

ActionKey=4: Before filing in the archive

By this request the script gets a message again after clipping, before the transfer to the archive begins. At this time actions can be performed, which concern the whole batch.

ActionKey=5: After filing in the archive

With this request it is possible to let an end action come off, e.g. writing a report. Example:

(29)

© 1998..2002 ELO Digital Office GmbH Page: 29 The following example does not require a barcode component, the document analysis takes place by a OCR procedure instead (only possible with fulltext option). Demo documents are easily created by printing the pages 100…200 of this document. With the help of the words “property” and “function” in the document head the script recognizes the start pages, all other pages are declared as countinuation pages. For storage mask you should select a mask, which has no barcode entry. The index with the storage target has to be entered in any case.

Set Elo=CreateObject("ELO.professional")

' at the storage nothing happens, the normal target ' of the mask definition is used

if Elo.ActionKey=1 then

' showing the currently edited document in the status line Elo.Status Elo.ObjShort

end if

' since the example documents contain no barcode, ' the division start page/continuation page has to be ' taken over completely by the script

if Elo.ActionKey=2 then

Elo.Status "OCR-processing " & Elo.ActivePostFile ' evaluating document head via OCR

call ELO.OcrClearRect()

call ELO.OcrAddRect("100,80,999,200") call ELO.OcrAnalyze(Elo.ActivePostFile,0) 'MsgBox Elo.OcrGetText(0)

' If the head contains the text „function“ followed ' by a function name, then it is a start page

Cnt=Elo.OcrPattern(10,"*'Function'_*L*", Elo.OcrGetText(0)) if Cnt>0 then

Elo.ObjShort=Elo.OcrGetPattern(3) Elo.DocKind=60

else

' Or if the head contains the text „property“ followed ' by a name, it is also a start page

Cnt=Elo.OcrPattern(10,"*'Property'_*L*", Elo.OcrGetText(0)) if Cnt>0 then

Elo.ObjShort=Elo.OcrGetPattern(3) Elo.DocKind=60

else

' All other pages are continuation pages Elo.ObjShort="continuation page" Elo.ObjMemo=Elo.OcrGetText(0) Elo.DocKind=61 end if end if end if

Collecting the Workflows Script Event (available from version 4.00.214 on)

This script event is requested after the client created the SQL inquiry for the workflow list in the task view and before the current database operation is executed. In the script the SQL command then can be changed, which can be read and written by the TextParam property. Remember, that the changed request must not lead to SQL syntax errors, otherwise the task list stays empty.

The possibilities to manipulate concern following regions:

• The WHERE clause can be changed, so that a subset of workflows can be displayed, e.g. selected by

(30)

© 1998..2002 ELO Digital Office GmbH Page: 30

• The SELECT list can be changed, so that one column shows additional information.

Mind that the type and the amount of columns must not be changed, otherwise the output occurs incomplete or is missing.

• The ORDER BY clause can be changed to get special sort orders.

If you need data to be entered by the user for this action, you shouldn’t question them in the script event, because it is requested quite often. Here it offers itself instead to use cookies. Put a script onto a user-defined button which questions the parameters and saves them into a cookie. Following “ClickOn” is executed on the workflow collecting button, so that the list is actualized immediately. The current event script then works with the data of the cookies area.

Example for simple customer number inquiry:

set Elo = CreateObject("ELO.professional")

Ctno = InputBox( "Please enter the wanted customer number now" ) if Ctno <> "" then

if Ctno = "*" then Ctno = ""

call Elo.SetCookie( "WF_CTNO", Ctno ) call Elo.ClickOn( "WvCollect" )

end if

The Event Script belonging to it:

set Elo = CreateObject("ELO.professional") Cmd = Elo.TextParam

wPos = Instr( Cmd, " where " ) if wPos > 0 then

Cmd = Left( Cmd, wPos - 1 ) & " , objkeys keys " & Mid( Cmd, wPos, 2000 )

oPos = Instr( Cmd, " order by " ) if oPos > 0 then

Ctno = Elo.GetCookie( "WF_CTNO") if Ctno <> "" then

Selection = " and keys.parentid = obj.objid and keys.okeyname = 'CTNO' and keys.okeydata = '" & Ctno & "' "

Cmd = Left( Cmd, oPos -1 ) & Selection & Mid( Cmd, oPos, 2000 ) Cmd = Replace( Cmd, "fl.wf_flow_name", "fl.wf_flow_name + ' : " & Ctno & "'" ) 'MsgBox Cmd Elo.TextParam = Cmd end if end if end if

This script performs two changes:

1. The selection is limited additionally to a specific customer number.

2. In the output is additionally displayed the corresponding customer number to the workflow name.

You need access to a further table for this action: the index data. The name of this table is objkeys, it is included in the list of the table between FROM und WHERE. The normal SQL command approximately looks like that: select fl.wf_flowid, fl.wf_eloobjid, fl.wf_flow_name, fl.wf_nodeid, obj.objtype, fl.wf_activate,

fl.wf_name, wf_comment, fl.wf_department, wf_terminate, fl.wf_department2 from workflowactivedoc fl, objekte obj

where fl.wf_eloobjid = obj.objid and (wf_department = 25) and wf_is_next = 1 order by fl.wf_activate, fl.wf_department

References

Related documents

The ELO ECM platform additionally provides: Legally compliant, rule-based, centralized filing, content outsourced and managed to various storage units, replication

The BluetoothAdapter lets you perform fundamental Bluetooth tasks, such as initiate device discovery, query a list of bonded (paired) devices, instantiate a BluetoothDevice using

These solutions cover the entire range of software possibilities: from the introductory DMS solution ELOoffice, designed for small businesses and independent contractors, to

In September 1997 the LuSE adopted listing rules harmonized with those of the Johannesburg Stock Exchange (JSE) as a result of the SADC initiative towards regional integration.

62h R or W For Read commands: slave will return its cur- rent volume setting in RETURN DATA For Write commands: slave will set its volume setting according to the WRITE VALUE. 2

ȫ Barring unforeseen changes, the soft environmental insurance market conditions seen in 2015, which were driven by abundant capacity, are likely to continue in 2016.. ȫ The

Postgraduate programs lead to the degrees of Master of Philosophy (MPhil) and Doctor of Philosophy (PhD) in the fields of anthropology, China’s economy, demography,

With ELO Connect, you can gather files from your mobile device, any connected external storage (e.g. Google Drive) in your app Outbox and select files to transfer to the ELO