Jump to content

Recommended Posts

Posted

Hi all,

I am new using AutoIT. I have found it very simple and easy to automate the windows applications. Now I am trying to automate a C# Windows form. I just need to pass a value to a text box in the window. When tried to get the name of the textbox through the AutoIT Window Info Tool, I got the class name as "WindowsForms10.EDIT.app4" and the instance is 1. Could anyone please help me on this?

Regards,

Dina.

Posted

Hi all,

I am new using AutoIT. I have found it very simple and easy to automate the windows applications. Now I am trying to automate a C# Windows form. I just need to pass a value to a text box in the window. When tried to get the name of the textbox through the AutoIT Window Info Tool, I got the class name as "WindowsForms10.EDIT.app4" and the instance is 1. Could anyone please help me on this?

Regards,

Dina.

Look up ControlSetText() in the help file. Use the advanced format to specify the ControlID:

$sNewText = "This is new text."
$hWin = WinGetHandle("Window Title", "Window Text")
ControlSetText($hWin, "", "[CLASS:WindowsForms10.EDIT.app4; INSTANCE:1]", $sNewText)

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

Look up ControlSetText() in the help file. Use the advanced format to specify the ControlID:

$sNewText = "This is new text."
$hWin = WinGetHandle("Window Title", "Window Text")
ControlSetText($hWin, "", "[CLASS:WindowsForms10.EDIT.app4; INSTANCE:1]", $sNewText)

:)

Thank you so much! I got it worked.

Regards,

Dina.

  • 7 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...