This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting a handle to a running application.  RSS feed

 
Tom Hughes
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Does anyone know how to get a handle to a running application ? (i'm using win NT).
The reason I want to do this, is that I want to implement something like sendkeys in vb.
Now I can do this by executing a new version of the application every time and sending keys to its event queue, however this would result in the user having too many open windows.
In Vb you use AppActivate (String windowTitle), basically I need to be able to do something like this.
cheers,
Tom
 
Chris Stehno
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats an interesting problem... I have never heard of any means of doing this with straight Java; however, you may want to look into JNI (Java Native Interface). You could come up with a C/C++ library and then access it with JNI. Someone may have come up with a JNI for VB by now, I am not sure.
Hope this helps.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!