Posted by Catur Nugroho | File under :

Autoit Control Show Using C#

Shows a control that was hidden.
ControlShow ( "title", "text", controlID )

Parameters

title The title of the window to access.
text The text of the window to access.
controlID The control to interact with. See Controls.

Return Value

Success: Returns 1.
Failure: Returns 0 if window/control is not found.

Remarks

None.

Source : Autoit Help Document

Source Code Autoit Control Show In C#



Parameters Required :
Title : [CLASS:Notepad]
Text : ""
Control : Edit1

private void controlShowButton_Click(object sender, EventArgs e)
        {
            //open notepad program
            autoit.Run("notepad.exe", "", 1);

            //wait notepad opened until 10 seconds
            autoit.WinWait("[CLASS:Notepad]", "", 10);

            //hide text area
            autoit.ControlHide("[CLASS:Notepad]", "", "Edit1");
            Thread.Sleep(2000);

            //show text area
            autoit.ControlShow("[CLASS:Notepad]", "", "Edit1");
        }


Download Full Source Code

0 comments:

Post a Comment