Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > polling for popup created by 3rd party java app

Reply
Thread Tools

polling for popup created by 3rd party java app

 
 
2xzero
Guest
Posts: n/a
 
      02-05-2004
Hello everyone,

I've searched sun.java's website and haven't found any info on if this
can be done. Perhaps someone here has done the same type of project.

Basically I want to listen for a popup message from this other
application which I don't have the source code to and automate a 'yes'
button press to it.

So far the solution seems to need to use jni and then C++ dll to poll
the windows event que, do a time diff,etc.....(yuk) However, I see
that C# can do this very easily, perhaps I could integrate C# with
java and be less work than the jni method.

I'm cluching straw here...can anyone share there experience with other
possible solutions to this type of problem.

Much thanks in advance. Joe
 
Reply With Quote
 
 
 
 
znôrt
Guest
Posts: n/a
 
      02-16-2004
On 5 Feb 2004 08:19:05 -0800, (2xzero) wrote:

>Hello everyone,
>
>I've searched sun.java's website and haven't found any info on if this
>can be done. Perhaps someone here has done the same type of project.


Windows' event queue is not Java related, so no wonder you didn't find
anything there.

>Basically I want to listen for a popup message from this other
>application which I don't have the source code to and automate a 'yes'
>button press to it.
>
>So far the solution seems to need to use jni and then C++ dll to poll
>the windows event que, do a time diff,etc.....(yuk)


That's the most flexible and obvious aproach.

On the other hand, instead of polling the mesage queue, I would
suggest traversing the window list (using win32 EnumWindows API) at
regular intervals until your popup is found or you decide to timeout.

>However, I see
>that C# can do this very easily, perhaps I could integrate C# with
>java and be less work than the jni method.


I don't know how you would code this in C#, but doing it in c++ is
pretty trivial. And then, with JNI you have a nice, clean and standard
interface from Java to c++, an extra problem by itself you had to
solve if you were to code it in C#.

>
>I'm cluching straw here...can anyone share there experience with other
> possible solutions to this type of problem.


Check out Java/COM bridge solutions, which allow you to access COM
objects from Java. Neva Object's Java2Com works great. Or you could
have your native popup-catcher be a standalone app in whatever
language, start it with Runtime.exec() and let your Java app get rid
of that nasty stuff alltogether.

Last of all, since you seem willing to stick with such platfrom
dependant hassles, you could try out MS's VM (i.e., VisualJ++). It has
custom native interfaces that might suit you, and is pretty OO (that
means, Obscene and Obsolete).
>
>Much thanks in advance. Joe


regards
znôrt


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading a 3rd party from a java code dvir shaty Java 5 02-16-2011 01:54 AM
Deploying JME app and accessing OTA as a 3rd party apps tetsuoni@gmail.com Java 0 10-18-2007 01:33 PM
Run 3rd party app as specified user =?Utf-8?B?Sm9obi5ORVQ=?= ASP .Net 0 07-11-2006 04:34 PM
3rd Party app stopping Zero config service on startup =?Utf-8?B?QW5ndXMgUm9va2U=?= Wireless Networking 1 08-20-2005 06:55 AM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57