也就是在find中的操作:
public boolean find(Dispatch selection,String toFindText) {
// 从selection所在位置开始查询
Dispatch find = Dispatch.call(selection,"Find").toDispatch();
// 设置要查找的内容
Dispatch.put(find,"Text",toFindText);
// 向前查找
Dispatch.put(find,"Forward","True");
// 设置格式
Dispatch.put(find,"Format","True");
// 大小写匹配
Dispatch.put(find,"MatchCase","True");
// 全字匹配
Dispatch.put(find,"MatchWholeWord","True");
// 查找并选中
return Dispatch.call(find,"Execute").getBoolean();
}
public boolean find(Dispatch selection,String toFindText) {
// 从selection所在位置开始查询
Dispatch find = Dispatch.call(selection,"Find").toDispatch();
// 设置要查找的内容
Dispatch.put(find,"Text",toFindText);
// 向前查找
Dispatch.put(find,"Forward","True");
// 设置格式
Dispatch.put(find,"Format","True");
// 大小写匹配
Dispatch.put(find,"MatchCase","True");
// 全字匹配
Dispatch.put(find,"MatchWholeWord","True");
// 查找并选中
return Dispatch.call(find,"Execute").getBoolean();
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货