[Glade-users] Virtual fingers




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




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]