Is it possible to focus 1 of 2 instances of the same process in OSX?

Asked by Tonatiuh Romero

I am trying to run two instances of the same process (Android emulator) on OSX and the focus one of them and later the other other, but App.focus seems only focus the first one all the time. Is this possible?

Question information

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

On Mac App.focus() finally uses the native method sharedWorkspace.launchApplication(appName), which either opens the app as frontmost or brings it to front, if already open.

appName either is a fully specified absolute path to the .app bundle or the string specified in the app's info.plist as CFBundleName.

as long as more than 1 instance of the same app is running, Sikuli's feature currently has no chance, to access a specific one of these instances (it seems, it gets the one, that was started first).

You might try, to duplicate the emulator app with another name and change the CFBundleName in its info.plist accordingly.

Revision history for this message
ABET (abetv) said :
#2

How are you setting your App name to focus on the android emulator for the MAC?

Can you help with this problem?

Provide an answer of your own, or ask Tonatiuh Romero for more information if necessary.

To post a message you must log in.