Would you like to write fewer lines of code? Let Domino do some of your work for you? I doubt you answered no, but if you have, what the heck -- read on to see what you'll be missing! We're going to show you how to use the LotusScript Evaluate statement to easily include short and powerful formula language constructs within your LotusScript code. You'll save a lot of headache, and as much as twenty lines of code at a time! A single Evaluate statement can often replace many lines of complicated script, and in some cases, can do what is nearly impossible in native LotusScript... full article about evaluate
now I will twice think what is better to use LS of @.
Monday, January 07, 2008
Wednesday, January 02, 2008
how to take all schedule agents from db
it takes all schedule agents from database. I suppose that somebody will find better solution, but for this moment I don't see the better solutions...
Dim s As New NotesSession
Dim db As NotesDatabase
Dim nc As NotesNoteCollection
Set db = s.CurrentDatabase
Set nc = db.CreateNoteCollection(False)
nc.SelectAgents = True
Call nc.BuildCollection
Dim note As NotesDocument
Dim nid As String
Dim flag As String
nid = nc.GetFirstNoteId
For i = 1 To nc.Count
Set note = db.GetDocumentByID(nid)
flag = note.GetItemValue("$Flags")(0)
If Instr(flag, "S") Then
Print note.GetItemValue("$Title")(0)
End If
nid = nc.GetNextNoteId(nid)
Next
Dim s As New NotesSession
Dim db As NotesDatabase
Dim nc As NotesNoteCollection
Set db = s.CurrentDatabase
Set nc = db.CreateNoteCollection(False)
nc.SelectAgents = True
Call nc.BuildCollection
Dim note As NotesDocument
Dim nid As String
Dim flag As String
nid = nc.GetFirstNoteId
For i = 1 To nc.Count
Set note = db.GetDocumentByID(nid)
flag = note.GetItemValue("$Flags")(0)
If Instr(flag, "S") Then
Print note.GetItemValue("$Title")(0)
End If
nid = nc.GetNextNoteId(nid)
Next
Lotus Blogs
I found 2 sites which store many lotus notes's blogs. I'll look at them more closely later, but in any case I like it and recommend to lotus notes developers to save the links.
One of them is DominoBlogs.com - I suppose the oldest and another one is Planet Lotus.
One of them is DominoBlogs.com - I suppose the oldest and another one is Planet Lotus.
Friday, December 21, 2007
Windows 95 or Windows NT
I was surprised when my friend shown me this in "help" ! I gave respect to Lotus after that.
This example compiles and runs in either Windows 3.1, Windows NT, or Windows 95. Depending on whether the application is compiled and run under 16-bit Windows (Windows 3.1) or 32-bit Windows (Windows 95 or Windows NT), you should declare and use an appropriate Windows handle variable and the appropriate version of two Windows API functions.
GetActiveWindow returns the handle (an Integer in 16-bit Windows, a Long in 32-bit Windows) of the currently active window. GetWindowText returns the text in the window title bar.
%If WIN16 ' 16-bit Windows
Dim activeWin As Integer ' Window handles are Integer.
Declare Function GetActiveWindow% Lib "User" ()
Declare Function GetWindowText% Lib "User" _
(ByVal hWnd%, ByVal lpstr$, ByVal i%)
%ElseIf WIN32 ' 32-bit Windows
Dim activeWin As Long ' Window handles are Long.
Declare Function GetActiveWindow& Lib "User32" ()
Declare Function GetWindowText% Lib "User32" _
Alias "GetWindowTextA" _
(ByVal hWnd&, ByVal lpstr$, ByVal i&)
%End If
' Print the name of the currently active window.
activeWin = GetActiveWindow() ' Returns an Integer or a Long.
Call GetWindowText(ActiveWin, winTitle$, 80)
Print winTitle$
Wednesday, December 19, 2007
is XML going to leave us? JSON is next?
SON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.
JSON is built on two structures:
* A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
* An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
here is a link to example JSON in Lotus Notes:
http://www.openntf.org/Projects/pmt.nsf/ProjectLookup/JSON%20LS
I will think about weak sides of every technology and will write later.
Enjoy
JSON is built on two structures:
* A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
* An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
here is a link to example JSON in Lotus Notes:
http://www.openntf.org/Projects/pmt.nsf/ProjectLookup/JSON%20LS
I will think about weak sides of every technology and will write later.
Enjoy
Subscribe to:
Posts
(
Atom
)