Reputation: 329
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:
@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: 0 if the window is not found.
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
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