You are on page 1of 7

ELO Digital Office

Page 1 of 7

Classic Flipcard Magazine Mosaic Sidebar Snapshot Timeslide

ELO Digital Office

13th August

ELO Digital Office


ELO has the ability to extend its function by accessing its API.

Scripting in ELO Client


Scripting in ELO client requires ELO object which can be found after installing ELO desktop client. ELO object is a COM component and can be called from both VBScript and JScript, commonly used is VBScript. Here is some simple sample in VB. dim Elo set Elo=CreateObject("Elo.Professional") '---create ELO object MsgBox "Elo's active tab is #" & Elo.SelectView(0) '---get active tab set Elo=Nothing

Sample reading object in archive.

Each object archived in ELO has its own object id (objid), we can then use it to tell ELO that we want to access it. First of all Elo.GetEntryId(-1) is used to get the objid of currently document being focused on, then followed by Elo.PrepareObject() to move its internal pointer into the selected objid. Commonly used functions and properties are: - Elo.ObjShort : to retrieve short name - Elo.ObjMName : to retrieve keyword name - Elo.ObjMaskNo : to retrieve keyword internal number - Elo.GetObjAttrib (index) : to retrieve a certain attribute value
Send feedback

http://pedagangcorp.blogspot.de/

30.09.2013

ELO Digital Office

Page 2 of 7

dim Elo Classic Flipcard Magazine Mosaic Sidebar Snapshot Timeslide dim objId dim Temp dim i set Elo=CreateObject("Elo.Professional") objId=Elo.GetEntryId(-1) '---get active object id if Elo.PrepareObject(objId,4,0)>0 then '---tell ELO to focus on this object Temp="short name = " & Elo.ObjShort & vbCrLf & _ "keyword name = " & Elo.ObjMName for i=0 to 5 Temp="Line #" & i & " ==> " & Elo.GetObjAttrib(i) & _ get attribute value vbCrLf next MsgBox Temp else MsgBox "Fail accessing object in archive" end if set Elo=Nothing

ELO Digital Office

'---

Sample updating object in archive

Commonly used functions and properties are: - Elo.LookupMaskName : to retrieve keyword internal number based on its name - Elo.SetObjAttrib index,value : to set a certain attribute value - Elo.UpdateObject : to apply changes dim dim dim dim Elo objId Temp i

set Elo=CreateObject("Elo.Professional") objId=Elo.GetEntryId(-1) '---get active object id

Send feedback

http://pedagangcorp.blogspot.de/

30.09.2013

ELO Digital Office

Page 3 of 7

Classic Flipcard Magazine Mosaic Sidebar Snapshot Timeslide Elo.ObjShort = "new short name" Elo.ObjMaskNo=Elo.LookupMaskName("New Keywording") --change keywording Elo.SetObjAttrib 0,"1st line" value Elo.SetObjAttrib 1,"2nd line" Elo.SetObjAttrib 2,"3rd line" '-

Elo.PrepareObject(objId,4,0)>0 then ELO if Digital Office focus on this object

'---tell ELO to

'---change attribute

Elo.UpdateObject '---apply changes else MsgBox "Fail accessing object in archive" end if set Elo=Nothing

Sample reading object in mailbox

Accessing object in mailbox almost alike as in archive. Since the document has not been archived, it doesn't have objid. We can use its line instead. Selected line can be retrieved by Elo.SelectLine(-1), but there are times that I found such way create some bugs, so I create a new function to provide a better way to get selected line.

dim dim dim dim

Elo line Temp i

set Elo=CreateObject("Elo.Professional") if getSelectedLine(line) then '---get selected line if Elo.PrepareObject(-1,line,0)>0 then '---tell ELO to focus on this object Temp="short name = " & Elo.ObjShort & vbCrLf & _ "keyword name = " & Elo.ObjMName
Send feedback

http://pedagangcorp.blogspot.de/

30.09.2013

ELO Digital Office

Page 4 of 7

for i=0 to 5 Temp="Line #" & i & " ==> " & Elo.GetObjAttrib(i) & _ -get attribute value Classic Flipcard Magazine Mosaic Sidebar Snapshot Timeslide vbCrLf next

ELO Digital Office

'--

MsgBox Temp end if else MsgBox "There is no selected line in mailbox" end if set Elo=Nothing

'********************************************************************* '---additional script '********************************************************************* Private Function getSelectedLine(ByRef line) Dim i, Temp i = 0: getSelectedLine = False Do While True Temp = Elo.PostBoxLineSelected(i) Select Case Temp Case 1: line = i: getSelectedLine = True: Exit Do Case -2, -1: Exit Do Case Else: i=i+1 End Select Loop End Function

Sample updating object in archive dim dim dim dim Elo objId Temp i

set Elo=CreateObject("Elo.Professional") objId=Elo.GetEntryId(-1) '---get active object id

Send feedback

http://pedagangcorp.blogspot.de/

30.09.2013

ELO Digital Office

Page 5 of 7

Classic Flipcard Magazine Mosaic Sidebar Snapshot Timeslide Elo.ObjShort = "new short name" Elo.ObjMaskNo=Elo.LookupMaskName("New Keywording") --change keywording Elo.SetObjAttrib 0,"1st line" value Elo.SetObjAttrib 1,"2nd line" Elo.SetObjAttrib 2,"3rd line" '-

Elo.PrepareObject(objId,4,0)>0 then ELO if Digital Office focus on this object

'---tell ELO to

'---change attribute

Elo.UpdateObject '---apply changes else MsgBox "Fail accessing object in archive" end if set Elo=Nothing

Updating object in mailbox is almost exactly as its counter part in archive, expect Elo.AddPostboxFile "" is used instead to apply any changes. dim dim dim dim Elo line Temp i

set Elo=CreateObject("Elo.Professional") if getSelectedLine(line) then if Elo.PrepareObject(-1,line,0)>0 then focus on this object Elo.ObjShort = "new short name" '---get selected line '---tell ELO to

Elo.ObjMaskNo=Elo.LookupMaskName("New Keywording") '---change keywording Elo.SetObjAttrib 0,"1st line" value Elo.SetObjAttrib 1,"2nd line" Elo.SetObjAttrib 2,"3rd line" Elo.AddPostboxFile "" end if '---apply changes
Send feedback

'---change attribute

http://pedagangcorp.blogspot.de/

30.09.2013

ELO Digital Office

Page 6 of 7

else MsgBox "There is no selected line in mailbox" end if Magazine Mosaic Sidebar Snapshot Timeslide Classic Flipcard

ELO Digital Office


set Elo=Nothing

Searching

The searching function provide the ability to find documents with certain keyword or attributes. Imagine when we do Searching using ELO's client. First we click the tab Searching, then we define that we want to search using keywording, next we will be defining its keyword and entering searching criteria; thus the same thing we do when searching via scripting. Elo.DoInvisibleSearch provide background searching and it will return how many object that match our searching criterias. It will be then translated into object id by calling Elo.GetEntryId (268435456 + search_number).

Note: Elo's internal cursor might messed up and cause strange behaviors when you call PrepareObject to send cursor to another object while you are using other object, ussually we put Elo.SaveObject 1 to save pointer state before calling PrepareObject and use Elo.SaveObject 2 to load the last saved pointer state.

dim Elo dim i,searchResult,tmpObjId dim arrResultObjId() set Elo=CreateObject("Elo.Professional") Elo.PrepareObject 0,0,0 '---prepare empty object Elo.ObjMaskNo=Elo.LookupMaskName("keywording") '---select keyword Elo.ObjShort="short" Elo.SetObjAttrib 0,"value #1" Elo.SetObjAttrib 1,"value #2" '---define searching criteria

searchResult=Elo.DoInvisibleSearch()

'---run the searching

Send feedback

http://pedagangcorp.blogspot.de/

30.09.2013

ELO Digital Office

Page 7 of 7

if searchResult>0 for i=0 to Temp-1 tmpObjId=Elo.GetEntryId((268435456 + i) '---get search Classic Flipcard Magazine Mosaic Sidebar Snapshot Timeslide objid redim preseve arrResultObjId(i):arrResultObjId(i)=tmpObjId next end if

ELO Digital Office

set Elo=Nothing Posted 13th August by pedagangcorp


0

Add a comment

Send feedback

http://pedagangcorp.blogspot.de/

30.09.2013

You might also like