LotusScript笔记.doc_第1页
LotusScript笔记.doc_第2页
LotusScript笔记.doc_第3页
LotusScript笔记.doc_第4页
LotusScript笔记.doc_第5页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

常有函数CBool(0)prints FALSE 0:假 ,非零:真CDbl ( expr )CInt ( expr )CLng ( expr )CSng ( expr )CStr ( expr )CVar ( expr ) The data type of the return value is Variant.Print Format(9, 0.0;0%) Output: 9.0Dim value As Integervalue = 0Print Format$(value, Yes/No) Output NoPrint Format$(value, On/Off) Output OffPrint Format$(value, True/False) Output Falsevalue = 2Print Format$(value, Yes/No) Output YesPrint Format$(value, On/Off) Output OnPrint Format$(value, True/False) Output True Date and Time formatsx = 36525Print Format(x, General Date) Output: 12/31/1999Print Format(x, Long Date) Output: Friday, December 31, 1999Print Format(x, Medium Date) Output: 31-Dec-99Print Format(x, Short Date) Output: 12/31/99y = 123.45Print Format(y, Long Time) Output: 10:48:00 AMPrint Format(y, Medium Time) Output: 10:48 AMPrint Format(y, Short Time) Output: 10:48Print Format(2010-11-15 12:53:52, yyyy-mm-dd) Output: 2010-11-15If condition Then statements Else statements IsArray ( expr )IsDate ( expr )IsDefined ( stringExpr )IsEmpty ( expr )IsList ( expr )IsNull ( expr )IsNumeric ( expr )IsObject ( expr )LBound ( arrayName , dimension )LCase$ ( expr )Left$ ( expr , n )Len ( stringExpr | variantExpr | numericExpr | typeName )LTrim ( stringExpr )Minute ( dateExpr )Month ( dateExpr )Now Print Format(Now(), Long Date)On Error errNumber GoTo label | Resume Next | GoTo 0 Print exprList Right$ ( expr , n )Second ( dateExpr )Split(expression as String, delimiter as String, count as Integer, compare as Integer) as VariantSub Initialize Dim ret As Variant dim teststr as string Dim delim As String teststr = This is the Connection delim = ret = split(teststr, delim) For x = 0 to 3 Print ret(x) NextEnd Sub OUTPUTThisistheConnectionSqr ( numExpr )UCase$ ( expr )LotusScript 语法Dim session As NotesSessionSet session = New NotesSessionDim doc As NotesDocumentSet doc = session.DocumentContextDim db As NotesDatabase Set db = session.CurrentDatabaseDim view As NotesViewSet view=db.getView(“v_all_finish”)Dim dbOther As NotesDatabaseSet dbOthrer=New NotesDatabase(“,” plan.nsf”)NotesDocumentnotesDocument.UniversalIDvalueArray = notesDocument.GetItemValue( itemName$ )Set notesItem = notesDocument.GetFirstItem( name$ )flag = notesDocument.Save( force, createResponse , markRead )call dockside(true,false)flag = notesDocument.HasItem( itemName$ )NotesDatabaseSet notesDocumentCollection = notesDatabase.AllDocumentsget: flag = notesDatabase.IsOpenSet notesView = notesDatabase.GetView( viewName$ )flag = notesDatabase.Open( server$, dbfile$ )Set notesDocumentCollection = notesDatabase.Search( formula$, notesDateTime, maxDocs% )Sub Initialize Dim session As New NotesSession Dim db As NotesDatabase Dim collection As NotesDocumentCollection Dim doc As NotesDocument Dim dateTime As New NotesDateTime(_ Cstr(Datenumber(2000, 5, 1) Dim nextDateTime As NotesDateTime searchFormula$ = Form = Project & ReminderDate = Today Set db = session.CurrentDatabase Set collection = db.Search(searchFormula$, dateTime,0) Set doc = collection.GetFirstDocument() Set nextDateTime = New NotesDateTime(Today) Call nextDateTime.AdjustDay(7) While Not(doc Is Nothing) Call doc.Send( True ) Call doc.ReplaceItemValue(ReminderDate, _ nextDateTime.LSLocalTime ) Call doc.Save( True, False ) Set doc = collection.GetNextDocument(doc) WendEnd SubDim vc As VariantDim Formula As StringFormula = SELECT Form = f_LicenceInfo & sys_SoftDelete != 1If doc.LicenceName(0) ThenFormula=Formula+&Contains(UpperCase(text(Certificate) ;UpperCase( + doc.LicenceName(0) + ) End IfSet vc = db.Search(Formula,Nothing,0)NotesDateTimeNotesItemTo get: flag = notesItem.IsAuthorsTo set: notesItem.IsAuthors= flagTo get: flag = notesItem.IsReadersTo set: notesItem.IsReaders= flagTo get: flag = notesItem.IsSummaryTo set: notesItem.IsSummary = flagCall notesItem.RemoveTo get: itemText$ = notesItem.TextNotesViewSet notesDocumentCollection = notesView.GetAllDocumentsByKey( keyArray , exactMatch% )To get: count% = notesView.EntryCountSet notesViewEntryCollection = notesView.GetAllEntriesByKey( keyArray , exactMatch% )Set notesDocument = notesView.GetNextDocument( document )Set notesDocument = notesView.GetLastDocumentNotesViewEntrySet notesDocument = notesViewEntry.DocumentNotesViewEntryCollectionTo get: count &= notesViewEntryCollection.CountSet notesViewEntry = notesViewEnt

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论