polling for popup created by 3rd party java app

Discussion in 'Java' started by 2xzero, Feb 5, 2004.

  1. 2xzero

    2xzero Guest

    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
    2xzero, Feb 5, 2004
    #1
    1. Advertising

  2. 2xzero

    znôrt Guest

    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
    znôrt, Feb 16, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Terry McKiernan
    Replies:
    0
    Views:
    1,368
    Terry McKiernan
    Jul 7, 2003
  2. BestNews

    Any 3rd party Grid control in dotnet

    BestNews, Aug 26, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    5,192
    Robert Jacobson
    Aug 26, 2003
  3. =?Utf-8?B?Sm9obi5ORVQ=?=

    Run 3rd party app as specified user

    =?Utf-8?B?Sm9obi5ORVQ=?=, Jul 11, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    357
    =?Utf-8?B?Sm9obi5ORVQ=?=
    Jul 11, 2006
  4. Replies:
    0
    Views:
    345
  5. dvir shaty
    Replies:
    5
    Views:
    445
    Arne Vajhøj
    Feb 16, 2011
Loading...

Share This Page