Jump to content

How to get text from a Time Display window


kcvinu
 Share

Recommended Posts

Hi all,

I need to get the time from a DAW (Digital Audio Workstation) software. I am using Steinberg Nuendo 4.3.  This whole software  is MDI program. It has a Time Display window to display the playing time. But this program change the time in that window by using WM_ERASEBKGND message.  I have the handle and device context of this Time display window. How can i get the time from these two informations.  Please see the image for a better understanding of this problem.

 

Captured_000101.jpg

Edited by kcvinu
Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

You cannot directly get the time with these two informations (except via OCR techniques). If the time is displayed as text in an Edit control or the like inside the window, you can extract the text from the control.

If the text isn't displayed in a control, but is drawn directly in the window as graphics, there are probably no methods other than OCR techniques.

Link to comment
Share on other sites

@LarsJ,

Thanks for the reply. Now  i am using the straight forward way, i.e activate the window and simulate a mouse click on the time display. This will cause the program to create an edit control on the time display and thus i can use the ControlGetText function.  But i am in search of a better way without activating the window.  So if we can use OCR techniques without activating the window, then i would like to know more about OCR APIs for AutoIt.  :)

Edited by kcvinu
Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

@Deye,

Thanks for the reply. If you mean "Cut Time" then it doesn't work for me. All i got this when i press Ctrl + Shift + X

<?xml version="1.0"?>
    <vst-xml version="1.0">
        <region id="251106184">
            <filename>D:\Nuendo Projects\Audio\61.wav</filename>
            <start>0</start>
            <end>130944130</end>
        </region>
    </vst-xml>

I inspect in the whole project and the region id is same in every time position in that track. So no use.

Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

It is easy to use Tesseract OCR in AutoIt. Only one command is needed, so there is really no need for a UDF.

Start by looking at these threads:
Tesseract Simple Example
Getting Tesseract to Work
Tesseract doesn't detect the easiest image

Procedure:
From the window handle you can get the position and size of the window. Then you can make a picture of the window and save to disk. Now you can use Tesseract to extract the text.

Link to comment
Share on other sites

@LarsJ ,

Hi, Thanks for the helpful reply. I just tested the tesseract example code with my time display window's image. It was a Success.  Now, all i have just two hurdles. One is to take a bitmap image of my window and i think it won't be that dufficult. Another  one is to make sure all these process will finish as fast as it can. :)

Edited by kcvinu
Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

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