使用OCR截图时经常会失败,提示是:客户端没有所需的特权

BUG反馈 · 861 次浏览
Husj 创建于 2021-05-01 21:54

如下所示


回复内容
CL 2021-05-01 22:06
#1

动作上右键调试运行看一下报错的是什么步骤。

Husj 2021-05-01 22:23 :
我在3楼回复下报错的代码
Marcus-5折CDN 2021-05-01 22:11
#2

搜了下可能是表格识别时,没有权限在 文档/Quicker/截图OCR 下面写入文件。

Husj 2021-05-01 22:22
#3
40801.0.1.1运行C#代码
[in]失败后停止【值/表达式】True
[in]脚本内容【值/表达式】using System.Drawing;\r\n
public static void Exec(Quicker.Public.IStepContext context){\r\n
\tImage image = (Image)context.GetVarValue("image");\r\n
\tdouble r = Convert.ToDouble(context.GetVarValue("imgRatio"));\r\n
\tstring d = context.GetVarValue("imgDirection") as string;\r\n
\tif(r == 0)\r\n
\t{\r\n
\t\tr = 1.1;\r\n
\t}\r\n
\tint w = Convert.ToInt32(image.Width * r);\r\n
\tint h = Convert.ToInt32(image.Height * r);\r\n
\tBitmap map = new Bitmap(image, w, h);\r\n
\t\r\n
\tif(d == "3")\r\n
\t{\r\n
\t\tmap.RotateFlip(RotateFlipType.Rotate90FlipNone);\r\n
\t}\r\n
\tif(d == "2")\r\n
\t{\r\n
\t\tmap.RotateFlip(RotateFlipType.Rotate180FlipNone);\r\n
\t}\r\n
\tif(d == "1")\r\n
\t{\r\n
\t\tmap.RotateFlip(RotateFlipType.Rotate270FlipNone);\r\n
\t}\r\n
\tif(d == "t1")\r\n
\t{\r\n
\t\tmap.RotateFlip(RotateFlipType.Rotate180FlipX);\r\n
\t}\r\n
\tif(d == "t2")\r\n
\t{\r\n
\t\tmap.RotateFlip(RotateFlipType.Rotate180FlipY);\r\n
\t}\r\n
\tcontext.SetVarValue("image",map);\r\n
}
[in]引用DLL库【值/表达式】
[in]允许缓存程序集【值/表达式】False
[in]执行线程【无输入】auto
4104异常:客户端没有所需的特权。
在 Microsoft.Win32.NativeMethods.CreateDirectory(String path, SafeLocalMemHandle acl)
在 System.CodeDom.Compiler.TempFileCollection.CreateTempDirectoryWithAce(String directory, String identity)
在 System.CodeDom.Compiler.TempFileCollection.GetTempFileName(String tempDir)
在 System.CodeDom.Compiler.TempFileCollection.EnsureTempNameCreated()
在 System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension, Boolean keepFile)
在 Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
在 Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames)
在 csscript.CSExecutor.CompileAssembly(ICodeCompiler compiler, CompilerParameters compilerParams, String[] filesToCompile)
在 csscript.CSExecutor.Compile(String scriptFileName)
在 CSScriptLibrary.CSScript.LoadWithConfig(String scriptFile, String assemblyFile, Boolean debugBuild, Settings scriptSettings, String compilerOptions, String[] refAssemblies)
在 CSScriptLibrary.CSScript.LoadCode(String scriptText, String tempFileExtension, String assemblyFile, Boolean debugBuild, String[] refAssemblies)
在 CSScriptLibrary.CodeDomEvaluator.CompileCode(String scriptText)
在 Quicker.Domain.Actions.X.BuiltinRunners.Other.RunCsScriptStep.<>c__DisplayClass43_0.<Execute>b__0()
在 Quicker.Domain.Actions.X.XActionHelper.ExecuteCommonAction(ActionExecuteContext context, ActionStep step, XAction action, Func`1 actionFunc, Action successAction, Action failAction, StepInParamDef stopIfErrorParam, StepOutParamDef isSuccessOutputParam)
4104步骤执行失败,原因:客户端没有所需的特权。
Husj 最后更新于 2021-05-01 22:23
CL 2021-05-01 22:26 :

看起来像没有权限创建临时文件。可以尝试退出所有安全、管家类的软件看看。

CL 2021-05-01 22:26 :

也可以百度一下报错文字。找到一下一个试试参考一下:http://www.shartu.com/system/131.html 

回复主贴