switchApp() doesn't work sometimes

Asked by qwert

On mac10.8, switchApp("myApplicationName") works well,
but on mac10.7, switchApp("myAppliationName") doesn't work, but if I call switchApp("/full/path/to/myApplicationName") works well.

So, My question is what rules are for switchApp()?
Why "myApplicationName" doesn't work, but "/full/path/to/myApplicationName" does work?

Thanks.

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

This Objectice-C function is used internally in the end:

[[NSWorkspace sharedWorkspace] launchApplication:appName]

Since there is some buzz in the net according problems in 10.9 coming from prior versions about the usage of this function, I guess we have to rework this feature. So I take this as a bug.

But the revision of the native features behind the App class is only on the list later this year.
So currently you have to live with the oddities.

Since I am developing Sikuli mainly on Maverick: Until now, I did not have switchApp problems with apps being in /Applications.

For unsigned apps though, the gatekeeper must be switched off (prefs -> security&privacy -> general -> Allow .... from anywhere)

Can you help with this problem?

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

To post a message you must log in.