Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Screen components  RSS feed

 
Paul Keohan
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to see what visual components are on a screen at any time by running a separate program?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That depends on exactly what you mean... If you launch a frame inside another program, that program can access the components on that frame by using getComponents(), or getContentPane(). If the frame is not running from inside your program, or is not a Java frame at all then it would be very difficult ( or impossible ).

-Nate
 
Paul Keohan
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like I have the very difficult or impossible option. I cannot access the code that builds and displays the frame. I am trying to run a completely separate program on my PC that will 'see' what wondows are in focus - if any.
Paul
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I doubt you will be able to do this in JAVA. You will probably have to use a language that can interact DIRECTLY with the Windows API rather than through a middle man.
------------------
Happy Coding,
Gregg Bolinger
 
Paul Keohan
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using IBM's Self Vocing Kit which can normally access whatever Java components are on my screen. It has been doing very well so far but now, with this one particular component, it fails. It just doesn't see it. Yet the component is in focus???
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!