Sign in to follow this  
Followers 0
s2mikey

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

2 posts in this topic

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!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0