Get a handle of a wine application and control it...

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Blizz
Newbie
Newbie
Posts: 2
Joined: Wed Mar 05, 2008 9:47 am

Get a handle of a wine application and control it...

Post by Blizz »

Hi,

I want to know if it's possible to get a handle of a wine application running via a linux program (C++ or java) and control it (ie: scrape the windows screen, put some mouse events to the application etc...).

By example:

1) start a windows program via wine
2) start my linux app
3) my linux find the windows program handle
4) my linux app read the screen content
5) my linux app execute actions on the windows app via the mouse or keyboard based on the screen content.

That should be doable but I don't know where to start, is there some wine api or documentation or something ?

Thanks in advance

Blizz
Dan Kegel

Get a handle of a wine application and control it...

Post by Dan Kegel »

On Wed, Mar 5, 2008 at 7:00 AM, Blizz <[email protected]> wrote:
I want to know if it's possible to get a handle of a wine application
running via a linux program (C++ or java) and control it (ie: scrape
the windows screen, put some mouse events to the application etc...).
There are probably many ways. One way might be to write
an autohotkey script and run that from the linux program.
- Dan
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Get a handle of a wine application and control it...

Post by vitamin »

Wine does not really have it's own API - it's either win32api or POSIX. If you need a "window handle" - you have to run your program under Wine, as those handles exist inside Wine only.

You can do lots of things outside Wine as well. Just remember that Wine plays some tricks with X. Oh and Wine have only one big top level window for each .. window. Controls (buttons, text, etc) do not have their own X windows.
Blizz
Newbie
Newbie
Posts: 2
Joined: Wed Mar 05, 2008 9:47 am

Post by Blizz »

Thanks for the replies,

Well I guess if only I could get the window position on the desktop it would be a start. I think the os could provide such info. right ?

Thanks

Blizz
Dan Kegel

Get a handle of a wine application and control it...

Post by Dan Kegel »

Locked