Jump to content

Recommended Posts

Posted

Hi all,

What we can do with the output of these two functions.

1. WinGetClassList

2. ControlGetHandle

If this is a silly question, please forgive me. 

  Reveal hidden contents

 

Posted (edited)

JohnOne, can i get the text on a control with a control handle. I have tested but it did not work.

Local $Window_title = "Nuendo - [Nuendo Project - 273-278.npr]"

Local $Control_handle = ControlGetHandle($Window_title,"",1)
Local $Control_txt = ControlGetText($Window_title,$Control_handle,1)
Alert($Control_txt)

This is my code. I have tested but not working

And please look this image. This is an audio editor. I need the data in the time display panel. Look the arrow. Window info tool shows "1" as ID.

post-89644-0-05129400-1425907138_thumb.j

Edited by kcvinu
  Reveal hidden contents

 

  • Moderators
Posted (edited)

Um... Pretty sure that WinGetClassList returns an array... :whistle:

Edit:

Are you sure you can get the text from that control?

When you put AutoInfo tool over the control, do you see text in the text output area?

In my experience, those types of controls are generally drawn, if they're not in the "COM" (if it's available) then you very well may need to do an OCR.  Without getting into that, you'd also need to check if IUIAutomation can get the data if AutoInfo tool can't, because if there's no data from AutoInfo tool, then ControlGetText is probably useless.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

@JohnOne, 2nd parameter is the handle of that control. Infact, i have tested with an empty string as 2nd param. But no way.

@SmokeN, Is there any OCR tool to work with autoit code ?. Because IUAutomation didn't give any better result than Window info Tool.

  Reveal hidden contents

 

  • Moderators
Posted (edited)

I sincerely don't trust them unless I've written them myself for the task at hand.  And it's certainly not something I'd use throughout my company or commercially.

Have you tried contacting the vendor?

Edit:

And as JohnOne said... your parameters are wrong:

ControlGetText($Window_title, "", $Control_handle)

Or

ControlGetText($Control_handle, "", "")

Might work.

Or

WinGetText($Control_handle, "")

Might even work.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

Thank you @SomkeN and @JohnOne

  Reveal hidden contents

 

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...