Hesein Burg
Hesein Burg

Reputation: 329

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

I am wondering how to provide the third parameter for this function being I cannot find any documentation or am looking at the documentation incorrectly.

  string windowTitle = "None Of Your Business";

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

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

The third parameter is where I have dubbed in the number 1, the data type is integer but the documentation when using AutoIt Scite IDE says this:

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:

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

I am attempting to use the @SW_MAXIMIZE option, how would I supply this?

Many thanks in advance.

Upvotes: 4

Views: 2401

Answers (1)

Hesein Burg
Hesein Burg

Reputation: 329

I figured out that you just need to reference the autoit object created like below:

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

Upvotes: 5

Related Questions