Re: attaching to a process and injecting events
- From: Michael Torrie <torriem chem byu edu>
- To: Chris Capon <abyss pathcom com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: attaching to a process and injecting events
- Date: Sun, 23 Apr 2006 10:09:59 -0600
On Sun, 2006-04-23 at 11:40 -0400, Chris Capon wrote:
Hi all:
Is it possible (relatively easy) to write a tool which can attach to a
running GTK process and inject events into its event handler?
I am interested in automating the import of OFX/QFX files into GNUCash
and can't see an easy way other than driving the GUI.
Since the source code is open and available (it's complexity
notwithstanding), the ideal solution is probably to just extend the
GNUCash modules to do what you want. Modifying the GUI code, for
example, is fairly trivial as GTK+ is easy to understand and follow, at
least in terms of modifying code that creates the GUI controls.
To do this there would need to be a way of:
a) given a process id, find out what windows are visible and/or have focus.
b) given a process id, send events to the event handler.
If I understand you correctly, you want to inject mouse clicks and so
forth into windows to automate a UI. X11 is probable the best place for
doing this kind of thing since there are already is a framework in place
for doing this, the TEST extension. Short of patching the running
executable, I don't believe there's any way to interact in the way you
are describing directly with the application binary.
Michael
Any pointers would be appreciated.
Thanks, Chris.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]