[in]失败后停止【值/表达式】True
使用Z.Expressions解析表达式出错,尝试使用DynamicExpresso.
异常:解析表达式出错。 内部错误:Oops! No applicable member has been found for the expression. The error occurred for expression "." at position 1011 near ".GetTypeFromProgID(\"Shell". 原始表达式: string folderPath = v_firstFile; string remark = v_textValue; string tag = v_File_tag; int sql = 692771314; if (string.IsNullOrEmpty(folderPath) || !Directory.Exists(folderPath)) { MessageBox.Show("文件夹不存在: " + folderPath); return "文件夹不存在: " + folderPath; } sql += 1; string desktopIniPath = Path.Combine(folderPath, "desktop.ini"); string tempIniPath = Path.Combine(Path.GetTempPath(), "desktop.ini"); // 注意:此处使用固定名也行 string iniContent = "[.ShellClassInfo]\r\n" + "InfoTip=" + remark + "\r\n" + "[{F29F85E0-4FF9-1068-AB91-08002B27B3D9}]\r\n" + "Prop5=31," + tag; File.WriteAllText(tempIniPath, iniContent, Encoding.Unicode); // 删除原 desktop.ini if (File.Exists(desktopIniPath)) File.Delete(desktopIniPath); // 使用 COM MoveHere 模拟 VBS 行为 object shell = Activator.CreateInstance(Type.GetTypeFromProgID("Shell.Application")); object folder = shell.GetType().InvokeMember("NameSpace", System.Reflection.BindingFlags.InvokeMethod, null, shell, new object[] { folderPath }); folder.GetType().InvokeMember("MoveHere", System.Reflection.BindingFlags.InvokeMethod, null, folder, new object[] { tempIniPath, 4 + 16 + 1024 }); // 设置 desktop.ini 属性 File.SetAttributes(desktopIniPath, FileAttributes.Hidden | FileAttributes.System); // 设置文件夹只读以启用 InfoTip var attr = File.GetAttributes(folderPath); if ((attr & FileAttributes.ReadOnly) == 0) File.SetAttributes(folderPath, attr | FileAttributes.ReadOnly); 开始位置:1011 附近代码:.GetTypeFromProgID(\"Shell
在 Quicker.Domain.Actions.X.XActionHelper.GetValueFromExpression2(String expression, ActionExecuteContext context) 在 Quicker.Domain.Actions.X.XActionHelper.<>c__DisplayClass2_0.fSthQyJhVP6() 在 Quicker.Domain.Actions.X.XActionHelper.GetParamValue(StepInParamDef paramDef, ActionStep step, ActionExecuteContext context, Boolean skipLogging, Boolean skipConvert, Boolean skipLogContent) 在 Quicker.Domain.Actions.X.BuiltinRunners.Misc.AssignValueStep.<>c__DisplayClass39_0.UddhmNDNf6v() 在 Quicker.Domain.Actions.X.XActionHelper.ExecuteCommonAction(ActionExecuteContext context, ActionStep step, XAction action, Func`1 actionFunc, Action successAction, Action failAction, StepInParamDef stopIfErrorParam, StepOutParamDef isSuccessOutputParam)
步骤(sys:assign)执行失败,原因:解析表达式出错。 内部错误:Oops! No applicable member has been found for the expression. The error occurred for expression "." at position 1011 near ".GetTypeFromProgID(\"Shell". 原始表达式: string folderPath = v_firstFile; string remark = v_textValue; string tag = v_File_tag; int sql = 692771314; if (string.IsNullOrEmpty(folderPath) || !Directory.Exists(folderPath)) { MessageBox.Show("文件夹不存在: " + folderPath); return "文件夹不存在: " + folderPath; } sql += 1; string desktopIniPath = Path.Combine(folderPath, "desktop.ini"); string tempIniPath = Path.Combine(Path.GetTempPath(), "desktop.ini"); // 注意:此处使用固定名也行 string iniContent = "[.ShellClassInfo]\r\n" + "InfoTip=" + remark + "\r\n" + "[{F29F85E0-4FF9-1068-AB91-08002B27B3D9}]\r\n" + "Prop5=31," + tag; File.WriteAllText(tempIniPath, iniContent, Encoding.Unicode); // 删除原 desktop.ini if (File.Exists(desktopIniPath)) File.Delete(desktopIniPath); // 使用 COM MoveHere 模拟 VBS 行为 object shell = Activator.CreateInstance(Type.GetTypeFromProgID("Shell.Application")); object folder = shell.GetType().InvokeMember("NameSpace", System.Reflection.BindingFlags.InvokeMethod, null, shell, new object[] { folderPath }); folder.GetType().InvokeMember("MoveHere", System.Reflection.BindingFlags.InvokeMethod, null, folder, new object[] { tempIniPath, 4 + 16 + 1024 }); // 设置 desktop.ini 属性 File.SetAttributes(desktopIniPath, FileAttributes.Hidden | FileAttributes.System); // 设置文件夹只读以启用 InfoTip var attr = File.GetAttributes(folderPath); if ((attr & FileAttributes.ReadOnly) == 0) File.SetAttributes(folderPath, attr | FileAttributes.ReadOnly); 开始位置:1011 附近代码:.GetTypeFromProgID(\"Shell
停止动作:解析表达式出错。 内部错误:Oops! No applicable member has been found for the expression. The error occurred for expression "." at position 1011 near ".GetTypeFromProgID(\"Shell". 原始表达式: string folderPath = v_firstFile; string remark = v_textValue; string tag = v_File_tag; int sql = 692771314; if (string.IsNullOrEmpty(folderPath) || !Directory.Exists(folderPath)) { MessageBox.Show("文件夹不存在: " + folderPath); return "文件夹不存在: " + folderPath; } sql += 1; string desktopIniPath = Path.Combine(folderPath, "desktop.ini"); string tempIniPath = Path.Combine(Path.GetTempPath(), "desktop.ini"); // 注意:此处使用固定名也行 string iniContent = "[.ShellClassInfo]\r\n" + "InfoTip=" + remark + "\r\n" + "[{F29F85E0-4FF9-1068-AB91-08002B27B3D9}]\r\n" + "Prop5=31," + tag; File.WriteAllText(tempIniPath, iniContent, Encoding.Unicode); // 删除原 desktop.ini if (File.Exists(desktopIniPath)) File.Delete(desktopIniPath); // 使用 COM MoveHere 模拟 VBS 行为 object shell = Activator.CreateInstance(Type.GetTypeFromProgID("Shell.Application")); object folder = shell.GetType().InvokeMember("NameSpace", System.Reflection.BindingFlags.InvokeMethod, null, shell, new object[] { folderPath }); folder.GetType().InvokeMember("MoveHere", System.Reflection.BindingFlags.InvokeMethod, null, folder, new object[] { tempIniPath, 4 + 16 + 1024 }); // 设置 desktop.ini 属性 File.SetAttributes(desktopIniPath, FileAttributes.Hidden | FileAttributes.System); // 设置文件夹只读以启用 InfoTip var attr = File.GetAttributes(folderPath); if ((attr & FileAttributes.ReadOnly) == 0) File.SetAttributes(folderPath, attr | FileAttributes.ReadOnly); 开始位置:1011 附近代码:.GetTypeFromProgID(\"Shell
耗时:27ms
这个是每次都出现吗 看着是我写的一个组件出的问题 .
看样子是识别错资源管理器. 所以后面也出错了