Jump to content

Reading contents of Afx:40000... window


dec
 Share

Recommended Posts

Hi everyone; I'm back with my noob questions.

I've got an application written with MFC;

It has a child named "LOGS" - actually it is something looking like a listview with two columns: timestamp amd event.

I need to get exactly what is shown on screen.

I've tried ALL controls and classes available in the window - all of them return empty string on WinGetText // ControlGetText.

While searching through this forum I've found an idea to use not a Control name, but its handle - but still can't have contents of this window.

$hCtrl = ControlGetHandle("sm56","","Afx:00400000:8:00010011:00000000:01CC05CA");
$str = ControlCommand("sm56ant","",$hCtrl,"Getcurrentline");;
Maybe I do something wrong?..

Also I tried something like Ctrl+A; Ctrl+C; Run notepad; Ctrl+V : Ctrl + A selects the table but its contents are not copied to clipboard:(

Standart functions like ClipGet()/ClipPut() cannot be used - I don't know how to get WHAT to put into clipboard.

The most similar to my problem was in this topic: http://www.autoitscript.com/forum/index.php?showtopic=15936

Hope it's not true that AutoIt cannot make it.

Real upyachka warrior

Link to comment
Share on other sites

  • Moderators

Is there an actual application we can test on? Without actually trying ourselves, it would just be guesses that would more than likely draw the thread out much further than need be, or weeks/months/years before you get an actual answer that works for you.

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.

Link to comment
Share on other sites

It has a child named "LOGS" - actually it is something looking like a listview with two columns: timestamp amd event.

I need to get exactly what is shown on screen.

loop for screen region change (while -wend- pixelgetcolor()

take a screenshot and ocr the region you need :) and fill your array to a file

Edited by Kilhian
Link to comment
Share on other sites

Hooray!!! I've managed to do that!=)

If someone is interested:

#include <GuiListView.au3>
$hCtrl = ControlGetHandle("MyApplication","","SysListView321");
    $items = _GUICtrlListView_GetItemCount($hCtrl);
    $item = _GUICtrlListView_GetItem($hCtrl, 1, 1);

Real upyachka warrior

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