2

I have a program executing through wine in Ubuntu 13, this program has its own GUI and there is some data on this program like in this picture:

Tables per room

My intention is (using Python) get this window, and try to obtain this data from it.

Right now I'm trying using wnsck:

from gi.repository import Gtk, Wnck

Gtk.init([])
screen = Wnck.Screen.get_default()
screen.force_update()

all_windows = screen.get_windows()  # First I get all windows

# Then I search my window 
my_window = all_windows[-1]  # Let's supose it's the last window

# I'm trying to do things like
my_window.get_data()  
my_window.steal_data()
# ... and many others methods I saw could be what I'm looking for

When I try to get some data as I said above I allways get:

RuntimeError: Data access methods are unsupported. Use normal Python attributes instead
  • Does anybody if it's possible to get process data with wnck ?
  • Does anybody knows another way to achieve what I'm trying ?

I'm trying to get some values displayed on the window

I know there are some libraries for windows, but I'm interested doing this in Ubuntu

Thanks in advance

4

0 回答 0