if service.isShowInputWindow()
local txt,gb=node.text,service.getSelectionStart()
if txt and txt~="" and not node.isShowingHintText()
local ksd,jsd,tj=0,0,utf8.len(txt)
ksd=utf8.sub(txt,gb,gb)
jsd=utf8.sub(txt,gb+1,gb+1)
if gb==0 then
service.speak("行首".."共"..tj.."字")
elseif gb==tj then
service.speak("行尾".."共"..tj.."字")
else
service.speak(ksd.."与"..jsd.."之间"..gb.."个插入点，共"..tj.."字")
end
else
service.speak("编辑框为空")
end
elseif service.isInWebView(node) and not service.isAutoTrans()
local wy,jd=service.getWebAllTextList(),service.getText(node)
local t,n,a={},0,""
for i=0,#wy-1
if wy[i]==jd
n=i
break
end
end
for j=n,#wy-1
if wy[j]~=a and #wy[j]~=3
table.insert(t,wy[j])
end
a=wy[j]
end
wy=table.concat(t,"。”")
wy=utf8.gsub(wy,"https?://[%w%%%=#/%?%._%-%+&]+","链接")
wy=utf8.lower(wy)
wy=utf8.gsub(wy,"广告。”.-。”.-。”.-。”","")
wy=utf8.gsub(wy,"%d%d%d%d%d%d%d%d%d%d%d%d+","号码")
service.speak(wy)
else
service.execute("自动浏览",node)
end
return true