kcvinu Posted January 17, 2019 Share Posted January 17, 2019 (edited) 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. Edited January 17, 2019 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 More sharing options...
LarsJ Posted January 18, 2019 Share Posted January 18, 2019 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. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
kcvinu Posted January 18, 2019 Author Share Posted January 18, 2019 (edited) @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 January 18, 2019 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 More sharing options...
Deye Posted January 18, 2019 Share Posted January 18, 2019 kcvinu, Try their help file @ commands_edit_category Deye Link to comment Share on other sites More sharing options...
kcvinu Posted January 18, 2019 Author Share Posted January 18, 2019 @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 More sharing options...
LarsJ Posted January 18, 2019 Share Posted January 18, 2019 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 ExampleGetting Tesseract to WorkTesseract 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. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
kcvinu Posted January 23, 2019 Author Share Posted January 23, 2019 (edited) @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 January 23, 2019 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 More sharing options...
LarsJ Posted January 23, 2019 Share Posted January 23, 2019 You can set up a small RAM-disc to speed up the process. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now