App.focus() launches application instead of just focussing

Asked by Pankaj Vatsa

When i use App.focus("App path here") command on my MAC OSX 10.8.2, i have a problem.
I want it to focus the Application (if the application is launched) and not to do anything if the application is not launched.
But if the application is not launched it launches the application also..

I don't want it to launch the application

Please Help..!!!

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Use App.focus() to start and focus the app.

Then check visually, wether your app is running:

if not exists("some app specific image.png", 10):
    print("app did not start")
    exit(1)

Can you help with this problem?

Provide an answer of your own, or ask Pankaj Vatsa for more information if necessary.

To post a message you must log in.