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

How to Use WinSetState function from the AutoIT Library with C#

我想知道如何为这个函数提供第三个参数,因为我找不到任何文档或者我看错了文档。

  string windowTitle = "None Of Your Business";

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

   auto.WinSetState(windowTitle, "", 1); //function I am trying to call

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

Parameters title The title/hWnd/class of the window to change the state. See Title special definition. text The text of the window to change the state. See Text special definition. flag The "show" flag of the executed program:

参考: https://www.autoitscript.com/autoit3/docs/functions/WinSetState.htm

我正在尝试使用 @SW_MAXIMIZE 选项,我该如何提供它?

非常感谢。

我发现您只需要引用如下所示创建的 autoit 对象:

auto.WinSetState(gameTitle, "", auto.SW_MAXIMIZE);