March 2007 Archives

Backup Notes Document on LotusScript

Create a button, then paste the below program. It translate document items to XML file.

Dim sSession As New NotesSession
Dim dbThis As notesDatabase
Set dbThis = sSession.CurrentDatabase
Dim dc As NotesDocumentCollection
Set dc = dbThis.UnprocessedDocuments
If (dc Is Nothing) Then Exit Sub
If (dc.count < 1) Then Exit Sub
Dim doc As NotesDocument
Set doc = dc.GetFirstDocument
While (Not doc Is Nothing)
Dim de As NotesDXLExporter
Set de = sSession.CreateDXLExporter()
Call de.setInput(doc)
Dim dxl As String
dxl = de.Export
Dim rt As NotesRichTextItem
Set rt = New NotesRichTextItem(doc, "Body")
Call rt.AppendText(dxl)
Call doc.Save(False, False)
Set de = Nothing
Set doc = dc.GetNextDocument(doc)
Wend

第二層皮膚


Human Furrier
Originally uploaded by philipz.
每每當代藝術館的展覽都吸引我前去欣賞,這次的「第二層皮膚」更介紹建築、流行服飾、人形機器、家具等人類在日常生活不可或缺的衍生(延伸)皮膚。
其中,「逆轉膜」的建築帷幕牆,可以汲水、接收太陽能、空氣清淨。正好符合綠色建築和數位建築的趨勢。未來有可能出現有生命的帷幕牆;就像那唐娜‧法蘭克林 (Donna Franklin)的「纖維反應」衣服是具有生命的;透過生技基改,將植物披覆改造成更適合用在帷幕牆,甚至整棟建築可自給自足,集水發電,不讓水資源從水溝流至大海。談到數位建築的代表就是Frank Gehry,Infinity SUV廣告,就是在西班牙畢爾包的古根漢博物館前面拍攝的。
另一個驚艷的作品是「BIX媒體外牆」,以日光燈管為像素(pixel),整個建築成為巨大的顯示器,雖然並沒包含當初設計的"互動性",但仍算是非常前衛的建築。之前有看過一則新聞,指英國有個巨大的互動戶外看板,有對大眼睛,當有路人經過時,便會盯著路人看,很可惜一直找不到這相關資訊,這互動廣告看板算是非常成功的。其他類似的互動廣告有Mobile billboardsFord Miracles的互動看板Nokia N90手機廣告
流行服飾則是,反諷人類穿戴動物皮草和男人沙文主義的癖掩汝頭包 Dangerous Beauty,不過應該沒幾個人敢拿著上街吧。

LotusScript Lists

Lists and Classes
• Classes allow us to bind complex data and operations.
• List allows us to look these up quickly in memory.
– Example: Lets extend our Person class:
dim People list as Person
dim PeopleByUNID list as Person
Dim P as new Person(“Joe Bloggs/ACME”, “010101010201020”)
....
set People(P.getName) = P
set PeolpeByUNID(P.getUNID) = P
if (isElement(People(“Joe Bloggs/ACME”))) then _
Print “Joe's UNID is: “ + People(“Joe Bloggs/ACME”).getUNID.
if (isElement(PeopleByUNID(“010101010201020”))) then _
Print “UNID “010101010201020” is: “ + _
PeopleByUNID(“010101010201020”).getName

LotusScript傳值到IE

How to transfer values between Lotus Notes and Internet Explorer
出處:
SearchDomino.com
其網站列出兩種方法:
The first,
1. Create a form.

2. Go to Form Global Declaration and declare the following:

Dim Uidoc as NotesUidocument
Dim IE as variant

3. Create an Editable Field Name called "HTML."

4. Create a button named "Open," and then copy the following script:

Dim Ws as New NotesUiWorkspace Set Uidoc=
Ws.CurrentDocument Set IE=CreateObject("InternetExplorer.Application")
IE.Height=450
IE.Width=550
IE.ToolBar=False
IE.StatusBar=False
IE.Resizable=False
IE.Navigate "http://notes.net/46dom.nsf"
IE.visible=True

5. Create a button and name it "Populate":

Dim StrValue as string
StrValue=IE.document.getElementByID("content-table").innerHTML
IE.Quit
call uidoc.FieldSetText("HTML",StrValue)

6. Compose the form.

7. Click on the "Open" button, and you'll find a "dialog box" opening the "notes.net" Web site.

8. Go back to Lotus Notes, click on the "Populate" button, and you will see the HTML populated in the Lotus Notes field.

The second,
'---- append to OPEN script

'Repeat until we give up or have success ..
Const retry_count = 20
Const ElementID = "content-table"

Dim aa%, Success%
Dim StrValue As String

aa = 0
Success = False

On Error Goto KeepTrying
GetElement:
' This fails if the page is not loaded yet
StrValue=IE.document.getElementByID
( ElementID ).innerHTML


' We only get here if we retrieved the element ..
Call uidoc.FieldSetText("HTML",StrValue)
Success = True
Goto TheEnd

TryAgain:
Sleep 1
aa = aa + 1
If (aa Then Goto GetElement
TheEnd:
IE.Quit
If Success Then
Print "Success in " & aa & " second(s)"
Else
Beep
Print |Failed: either the URL did not load in |
& retry_count & | seconds or the element "|
& ElementID & |" does not exist in the page.|
End If
Exit Sub

KeepTrying:
Resume TryAgain
'---- end code ---

March 2010

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Archives

Powered by Movable Type 4.34-en

Recent Comments

  • panandy: 3Q read more
  • Anonymous: philipz大 沒有邀請碼,無法註冊,致無法下載工具 請問有何方法可以解決? 感恩 read more
  • philipz: harushard, It is your java code problem. Check it and read more
  • harushard: java.lang.NoClassDefFoundError: Could not initialize class examples.ExamplesMCRFactory could you explain why read more
  • philipz: IM已經是無解了,建議可以用Plurk Api試看看。 read more
  • ann: hi,請問以上問題解決了沒?可以分享一下嗎? read more
  • Anonymous: 邀請碼沒有~無法下載工具~~怎麼辦 read more
  • Melody: test read more
  • philipz: Ginger: 您好,請您在我的噗浪上留言即可一起討論。 read more
  • Ginger: 版大您好: 在看過您做的期貨即時訊息BOT後覺得很不錯,自己也有一些想法不知能否與您交流與協助呢? 若您覺得ok的話,可以email或是噗浪(ID: king0355)與我聯繫。感謝 : ) read more

About this Archive

This page is an archive of entries from March 2007 listed from newest to oldest.

February 2007 is the previous archive.

April 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.