标签: autoit-c#-wrapper

C# Windows 7 应用程序 System.DllNotFoundException 上的 AutoIt (AutoItX)

我有一个使用 AutoItX 进行自动化的 C# 应用程序。此应用程序在我使用 Microsoft Visual Studio 2013 版本 3 编译的 Windows 8.1 x64 环境中运行良好。

我将应用程序代码的副本推送到 bitbucket 存储库并将其克隆到运行 Windows 7 x64 的计算机。安装了 AutoItX 3.14.2 版并选择了 32 位调用。该应用程序是使用 Visual Studio 2013 版本4编译的。

应用程序编译正常,但第一次使用 AutoIt 函数导致错误:

An unhandled exception of type 'System.DllNotFoundException' occurred in AutoItX3.Assembly.dll
Run Code Online (Sandbox Code Playgroud)

我尝试了以下步骤。该应用程序在每个步骤后都经过测试

  1. 尝试使用 regsrv32 手动注册 .dll

    regsrv32 "C:\Program Files (x86)\AutoIt3\AutoItX\AutoItX3.dll"

  2. 卸载 VisualStudio 2013 R4 并尝试重新安装 VisualStudio 2013 R3 {R3 的安装失败,因为它需要 Internet Explorer 版本 10,并且此计算机上已经安装了版本 11} 所以重新安装了 R4

  3. 卸载 AutoIt 并重新安装,选择 64 位库首选项。使用 x64 平台选项编译应用程序

  4. 卸载 …

c# dll automation autoit-c#-wrapper

5
推荐指数
1
解决办法
1778
查看次数

如何在 C# 中使用 AutoIT 库中的 WinSetState 函数

我想知道如何为此函数提供第三个参数,因为我找不到任何文档或我正在错误地查看文档。

  string windowTitle = "None Of Your Business";

   AutoItX3 auto = new AutoItX3(); // auto it object

   auto.WinSetState(windowTitle, "", 1); //function I am trying to call
Run Code Online (Sandbox Code Playgroud)

第三个参数是我在数字 1 中配音的地方,数据类型是整数,但使用 AutoIt Scite IDE 时的文档是这样说的:

参数 title 要改变状态的窗口的标题/hWnd/class。请参阅标题特殊定义。text 要改变状态的窗口文本。请参阅文本特殊定义。flag 已执行程序的“显示”标志:

  • @SW_HIDE = Hide window
    @SW_SHOW = Shows a previously hidden window
    @SW_MINIMIZE = Minimize window
    @SW_MAXIMIZE = Maximize window
    @SW_RESTORE = Undoes a window minimization or maximization
    @SW_DISABLE = Disables the window
    @SW_ENABLE = Enables the window Return Value Success:  1. Failure: …
    Run Code Online (Sandbox Code Playgroud)

.net c# autoit-c#-wrapper

4
推荐指数
1
解决办法
1659
查看次数

标签 统计

autoit-c#-wrapper ×2

c# ×2

.net ×1

automation ×1

dll ×1