Home       About Genii       Products       Downloads       News & Events       Support       Weblog   
January, 2009
SMTWTFS
    01 02 03
04 05 06 07 08 09 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
January, 2009
December, 2008
November, 2008
October, 2008
September, 2008
August, 2008

Show all 69 months


Search the weblog

Ben Langhinrichs
E-mail address - Ben Langhinrichs

Photograph of Ben Langhinrichs



©2003-2009 Genii Software Ltd. All rights reserved. The rights to all logos, images, etc. are owned by their respective owners.

The views expressed in this weblog are mine alone, but since I am President and Owner, they necessarily also reflect the views of Genii Software, Ltd.
Genii Weblog
Genii Weblog

Minimalist coding

Tue 14 Oct 2003, 11:47 PM

How short is your shortest useful agent?  This one I wrote today converts Notes bitmaps to GIF format for every rich text field on the current document (there are several rich text fields in this form which might have images).  The full code is:

'Convert Bitmaps to GIFs for all: 

Option Public
Option Declare
Uselsx "*lsxrtc"


Sub Initialize
   Dim session As New NotesSession
   Dim doc As NotesDocument
   Dim gSession As New GeniiSession
   
   Set doc = session.DocumentContext
   
   On Event ActOnItem From gSession Call ConvertBitmaps
   Call gSession.BatchBackend(doc.Handle, "*")
End Sub

Sub ConvertBitmaps(Source As GeniiSession, Byval action As String, Byval properties As String, skipnote As Integer, continue As Integer)
   Print "Converting bitmaps in " & Source.BatchRTItem.Fieldname
   Call Source.BatchRTItem.Everything.ConvertBitmaps
End Sub


You don't get much shorter.  Maybe I should comment it or something.

Copyright © 2003 Genii Software Ltd.

What has been said:

58.1. Jens-Christian Fischer (10/15/2003 08:52 AM)

I. need. this.

This is the 3.20, right?

58.2. Ben Langhinrichs (10/15/2003 11:11 AM)

Yes, that's Version 3.20. I guess I should post a "What's New in 3.20" summary. It will be out shortly.

Have your say:

Name *:
E-mail:
e-mail addresses will not be displayed on this site
Notify me of other comments

Comment *:


<HTML is not allowed>
Linking: Add links as {{http://xxx|title}}, and they will be activated once approved
Blocked? Unable to post a comment? Please read this for a possible explanation...

Copyright © 1996-2009 Genii Software Ltd. All Rights Reserved. Some images courtesy of BigFoto.com  Nedstat