Jump to content

Windows Text box "text" property access issue...


Recommended Posts

Hi all, Whats the trick(if any) to accessing a Windows Text box control's text property by simply calling it by name instead of by the "ClassNN" value?

Heres the deal - I have to store all of my textbox controls as constants because the only way I can access the actual text in them or set text in them is by the following identifier/Control ID: "ClassNN:WindowsForms10.EDIT.app.0.c8febe_r16_ad123"

The problem is that on occassion, some of the "ClassNN..." values do change and this of course messes up the script.

Here is the actual "name" of the text field Im trying to access: uploadHostUploadServerTextBox

However, when I try to set the text of this control using "uploadHostUploadServerTextBox" as the control ID, it doesnt work. Ive tried ControlSetText and ControlSend.

What am I doing wrong here???

Thanks!

Link to comment
Share on other sites

Where did you get the "actual name" from? There is a NAME property for (some, not all) .NET controls. If that's what you have, it would look like this:

$sText = ControlGetText($hWindow, "", "[NAME:uploadHostUploadServerTextBox]")

See "Controls" in the help file for more options to specify a control.

:unsure:

Edited by PsaltyDS
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
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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