loutsScript 常用代码
1、FTSearch搜索:
Set dc=db.Ftsearch("name",0)
'0位置为最大的查询数,0为所有匹配的文件 FTSearch必须创建数据库索引
Set doc=dc.Getfirstdocument()、
2、Item:
Set doc=dc.Getfirstdocument()
While Not doc Is Nothing
ForAll ritem In doc.Items
MsgBox ritem.name
End ForAll
Wend
3、取出特定的域
Set doc=view.getFirstdocument()
If doc.HashItem("yu") <> "" Then
Set item=doc.getfirstitem("yu")
Set doc=view.getNextdocument(doc)
End If
4、使用文本属性
If doc.Hashitem("yu") <> "" Then
Set doc=dc.Getfirstdocument()
While Not doc Is Nothing
ForAll itemValue In doc.yu
itemValue = "Anonymous"
End ForAll
Set doc=dc.Getnextdocument(doc)
Wend
End If
5、获取域值:
ForAll itemValue In doc.Getitemvalue("yu")
6、添加域
set item =new NotesItem(doc,"newYu",session.UserName)
Call doc.Appenditemvalue("newYu",Newvalue)
7、替换值:
1)、 While Not doc Is Nothing
Call doc.Replaceitemvalue("resName","newValue")
Set doc=dc.getnextdocument(doc)
Wend
2)、Set doc=dc.Getfirstdocument()
While Not doc Is Nothing
'Call doc.Replaceitemvalue("resName","newValue")
Set item =doc.Getfirstitem("yu")
While Not item Is Nothing
ForAll resitems In doc.Itemsv(0)
resitems="newVlaue"
End ForAll
doc.name= doc.Itemsv(0)
Set item =doc.getnextitem(item)
Wend
Set doc=dc.getnextdocument(doc)
Wend
8、拷贝域
Set item =doc.Getitemvalue("name")
call item.Copyitemtodocument(doc, "name")
call doc.save(true,false)
Call doc1.Copyallitems(doc2,true) ‘替换所有的
9、删除指定的域:
1)、 For j=1 To dc.count
Set item=doc.Getitemvalue("name")
While Not item Is Nothing
Call item.Remove()
Call doc.Save(true,false)
Wend
Set doc=dc.Getnthdocument(j)
Next
2)、For j=1 To dc.count
While Not doc.Hasitem("name")
Call doc.Removeitem("name")
Call doc.Save(True,false)
Wend
Set doc=dc.Getnthdocument(j)
Next
10、RTF文本域的输出:
Set item=doc.GetFirstItem("RtfYU")
MsgBox item.Text
11、在代理中使用公式:
temp=Evaluate("@ReplaceSubstring(aa;bb;cc)",doc)
12、 嵌入对象:
ForAll csx In doc.Embeddedobjects
csx.name
End ForAll
Set doc=dc.Getnthdocument(j)
Next
13、激活嵌入对象:
Call doc.EmbeddedObjects(0).Activate(True)
14、if的用法
Set doc=dc.Getfirstdocument()
If Not IsEmpty(db.Agents) Then
ForAll agent In db.Agents
MsgBox agent.name
End ForAll
End If
loutsScript 常用代码的更多相关文章
- GCD 常用代码
GCD 常用代码 体验代码 异步执行任务 - (void)gcdDemo1 { // 1. 全局队列 dispatch_queue_t q = dispatch_get_global_queue(0, ...
- 转--Android实用的代码片段 常用代码总结
这篇文章主要介绍了Android实用的代码片段 常用代码总结,需要的朋友可以参考下 1:查看是否有存储卡插入 复制代码 代码如下: String status=Environment.getE ...
- 刀哥多线程之03GCD 常用代码
GCD 常用代码 体验代码 异步执行任务 - (void)gcdDemo1 { // 1. 全局队列 dispatch_queue_t q = dispatch_get_global_queue(0, ...
- jquery常用代码集锦
1. 如何修改jquery默认编码(例如默认GB2312改成 UTF-8 ) 1 2 3 4 5 $.ajaxSetup({ ajaxSettings : { contentT ...
- Mysql:常用代码
C/S: Client Server B/S: Brower Server Php主要实现B/S .net IIS Jave TomCat LAMP:L Mysql:常用代码 Create table ...
- javascript常用代码大全
http://caibaojian.com/288.html 原文链接 jquery选中radio //如果之前有选中的,则把选中radio取消掉 $("#tj_cat .pro_ca ...
- Android 常用代码大集合 [转]
[Android]调用字符串资源的几种方法 字符串资源的定义 文件路径:res/values/strings.xml 字符串资源定义示例: <?xml version="1.0&q ...
- NSIS常用代码整理
原文 NSIS常用代码整理 这是一些常用的NSIS代码,少轻狂特意整理出来,方便大家随时查看使用.不定期更新哦~~~ 1 ;获取操作系统盘符 2 ReadEnvStr $R0 SYSTEMDRIVE ...
- PHP常用代码大全(新手入门必备)
PHP常用代码大全(新手入门必备),都是一些开发中常用的基础.需要的朋友可以参考下. 1.连接MYSQL数据库代码 <?php $connec=mysql_connect("loc ...
随机推荐
- MySQL Replication的Reset slave重置命令
有时要清除从库的所有复制信息,如切换为不同的Master, 主从重做等:Reset slave是一个比较危险的命令,所以在执行前一定要准备知道其含义. 1. 命令在slave上执行,执行前一定要停掉s ...
- 【转】利用xcode生成的app生成可以在iphone和itouch上运行的ipa安装包
转载地址:http://blog.csdn.net/yohunl/article/details/5971252 在编译好的真机版目录下的.app文件,至于生成真机可以运行的app的方法,有两种方式, ...
- nodejs表单验证
//创建express连接 var exp = require('xepress'), http = require('http'); //初始化exprerss模块 var app = exp(); ...
- 20151124002 treeView 数型菜单的操作
20151124002 treeView 数型菜单的操作 protected void FillTree() { SqlConnection1 = new Syst ...
- vim标准操作
主要技巧: ->普通模式负责所有光标定位能力.插入模式随时使用<esc>键回到普通模式并且尽量保持普通模式为主要的工作状态. -> hjkl四键负责光标的低速移动,如果还在使用 ...
- Behavior Designer中的内置消息机制
最近在用Behavior Designer,其中需要用到消息机制,看了一下其中自带了这套东西 注册 Owner.RegisterEvent<string>("Message&qu ...
- selenium帮助手册以及 webdriver的各种driver
帮助手册 http://selenium-python.readthedocs.io/locating-elements.html 转载于:http://blog.csdn.net/five3/art ...
- 灰色预测模型 c# 算法实现
public class GrayModel { private double a0, a1, a2; private int size; priva ...
- Android内存Activity泄露:Threads
Android编程中一个共同的困难就是协调Activity的生命周期和长时间运行的任务(task),并且要避免可能的内存泄露.思考下面Activity的代码,在它启动的时候开启一个线程并循环执行任务. ...
- infragistcs 又
1:UltraGrid风格设置函数 public static void ColorGrid(ref Infragistics.Win.UltraWinGrid.UltraGrid dgd) { // ...