← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #248663]: Find running program (using App.focus) for a process started via command (e.g. java -jar ....)

 

Question #248663 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/248663

    Status: Open => Answered

RaiMan proposed the following answer:
Usually the string shown as app name in the top menu bar.

But I just checked: seems not to work (started a jar from command line).

So if it does not work in your case, only the visual approach helps:
- wait for an image, that shows you: app is ready
- use: win = App.focusedWindow() (should be the topmost window now)
- click the titlebar of this window

If you want to come back to the window later: take care, that some edge
of the window stays visible, so you can click it to get it to front.

I am sorry, but on Mac, there is currently no other option (like on
Windows with part of the window title).

If nothing else helps, you might be able to make a small script with
AppleScript and run it using osascript.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.