[Glade-users] Virtual fingers

M Murphy m at dmdt.org
Sun Jun 29 10:44:37 EDT 2008


Dear All,

Given that every button on a GTK interface has a name, can external programs access those buttons?

 - So, suppose that my good friend Johnny has written a program with a GTK interface and that I'm running a copy.
 - Can I write a quick & simmple bash script that presses a given button on the gui?

I imagine that the process would go something like this:
 - Find out the name of the button I want to press.  I can look in the source code for this and maybe even arrange so that if I right click on any GTK button, one of the options presented in the menu gives me the name of the button.
 - Within the bash script:
   - Run ps to find the process ID of the application.
   - Ask X nicely to tell me all the windows owned by that PID.
     (How do I do this?)
   - Now I have enough information to identify the button to
     by bash script.  Now I just need a way of saying
     <path to button>.click!

The scripting language is negotiable - bash is just an example.


Many thanks,

Max


More information about the Glade-users mailing list