/** * creates an instance for an app with this name and tries to open it * * @param appName name * @return the App instance or null on failure */ public static App open(String appName) { return new App("+" + appName).open(); }
/** * tries to identify a running app with name and if not running tries to open it and tries to make it the foreground * application bringing its window with the given number to front * * @param appName name * @param num window * @return the App instance or null on failure */ public static App focus(String appName, int num) { return (new App("+" + appName)).focus(num); }
/** * tries to identify a running app with the given name and then tries to close it * * @param appName name * @return 0 for success -1 otherwise */ public static int close(String appName) { return new App("+" + appName).close(); }
if (Type.EDITOR.equals(appType)) { if (runTime.runningMac) { app = new App(appsMac.get(appType)); if (app.window() != null) { app.focus(); app = new App(appsWindows.get(appType)); if (app.window() != null) { app.focus(); app = new App(appsWindows.get(appType)); if (app.window() != null) { app.focus();