Jump to content

ControlGetText - Question Regarding Better Means of Getting Message/Text Box Values


Recommended Posts

Posted

Hello,

I have been able to retrieve the text in the IEEE address box in the below TI application. (shown in the small message box at the top-middle of the below screenshot)

I used ControlGetText, but by automating the movement of the cursor to the box where the data is to give the message box focus.

I know a cleaner means of doing this would involve using Class Name and the control index of the IEEE message box which happens to be 5.

Could someone tell me how you would code this wo a prior mouse-move?

image.thumb.png.0a1d21a2a97947852271e53b9426c271.png

Posted

Not sure why you would need to MouseMove the cursor before using ControlGetText.  It is not usual.  Beside providing a small piece of code that shows what you are attempting is always much more descriptive than an english explanation...

Posted

I got it to work with a mouse move to the control.

I know I can get the info without having to involve the mouse.

That is what I am asking about how to do.

JOhn

Posted
3 hours ago, argumentum said:

Why not just WinGetText() and StringSplit() it ?, it'd be simpler that way.
If a MouseMove() is needed to update the data, then that is on the ones who coded the SmartRF being lazy.

Argumentum,

Is there more or less enough info in my screenshot that you could show me what that line of code would look like?

Thanks!

Posted
1 hour ago, argumentum said:

If you press F1 while the cursor is at a word, the help file will give you a description of it.
I will step out of your postings until you show better proficiency. 


I had locked at the details about _ArrayDisplay, but it did not seem to explain how it got the info in the background of the app for the array of the values of the elements involved
in the items related to it. I am asking the question because I am trying to learn.

 

 

On 12/25/2025 at 9:00 AM, argumentum said:

Why not just WinGetText() and StringSplit() it ?, it'd be simpler that way.
If a MouseMove() is needed to update the data, then that is on the ones who coded the SmartRF being lazy.

Argumentum,

Is there more or less enough info in my screenshot that you could show me what that line of code would look like?

Thanks!

Posted
On 12/26/2025 at 7:04 AM, ACCTE said:

Argumentum,

Is there more or less enough info in my screenshot that you could show me what that line of code would look like?

Thanks!

The best way to learn AutoIT, is to create test scripts to explore the use of functions, commands, and keywords, and keep writing and testing.

I started using AutoIT about 11 years ago. I am self taught using the inbuilt help, and writing test scripts. In that time I have written hundreds of compiled scripts or code snippets or includes. I have created about 100+ Gui based programs, and written dozens of Windows Services using AutoIT; dozens of MSP apps, and several very significant platforms for remote access of networks and devices, encryption, security, and a range of tools that connect to a wide range of hardware and security devices.  I also created my own debugging shortcuts, methods, and platforms, and bound those into multiple UDFs that get included with programs.  In addition I have written hundreds of UDFs, in dozens of include files.

And I don't think of myself as an expert, just an amateur with lots of experience.

I did not have any help, and I never once felt the need to ask questions in these forums. Instead I searched google using queries starting with "AutoIT", looked at how other members solved problems, or simply read through, or searched through the AutoIT help contents.

By observation, you may not be suffering with learning AutoIT specifically, but with programming in general.

I suggest:

[1] Purchase a copy of "Code Complete 2", and read it 3 times. (I'm serious - I did.)

[2] Create test scripts, to test each function or command you need or want to use, until you fully understand the command or function, inside out.  What it can do, what it can't do, and range of output(s).  Understanding does not come from being told, it comes from doing.

[3] Certain colleagues and I have a general rule that before you ask for help, you first come up with 3 solutions on your own.

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
×
×
  • Create New...