| 
 | 
 
楼主 心灵亮光说: 焦点落在图片,想详细了解这个图片就可以启动插件,启动后有两个选择,一个是全屏的识别,一个是焦点的识别。 
可以在资源下载扩展插件里面搜索。也可以复制以下代码。 
require "import" 
import "android.content.Intent" 
import "android.graphics.Bitmap" 
import "android.net.Uri" 
import "java.io.File" 
import "java.io.FileOutputStream" 
local t = {"焦点识别", "全屏识别"} 
function txms(mode) 
app_pkg = "com.bemyeyes.bemyeyes" 
store_url = "market://details?id=" 
if mode ==1 then 
this.getScreenShot(node, { 
onScreenCaptureDone = function(A0_4) 
A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg"))) 
this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg")))) 
end 
}) 
else 
this.getScreenShot({ 
onScreenCaptureDone = function(A0_4) 
A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg"))) 
this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg")))) 
end 
}) 
end 
end 
require "import" 
local dlg = LuaDialog().setItems(t).show() 
dlg.onItemClick = function(l, v, p, i) 
dlg.dismiss() 
txms(i) 
end 
return true,  
 
来自:掌上乐园 |   
 
 
 
 |