kasper / phoenix

A lightweight macOS window and app manager scriptable with JavaScript
https://kasper.github.io/phoenix/
Other
4.37k stars 127 forks source link

AppName with a dot could not be found #335

Open ishiharas opened 1 year ago

ishiharas commented 1 year ago

Hello, right now I'm trying some of the basic examples.

I have written the following short snippets:

Key.on('z', ['control', 'shift'], () => {
    const test = App.launch('Whatsapp', {focus: true});

    if (test) {
        test.windows().map((cb) =>
            cb.setTopLeft({
                x: 0,
                y: 0,
            }),
        );
    }
})

Key.on('l', ['control', 'shift'], () => {
    const focused = App.focused();
    console.log(focused.name());
})

And launching apps like "Whatsapp" or "Slack" works like a charm. But another app named "Rocket.Chat" won't start at all.

Terminal logs give the following output: Phoenix: Error: Could not find an app with the name “Rocket.Chat”.

Trying the second shortcut over the focused window prints the following output: Phoenix: Rocket.Chat

That's why I think, that names with dots are not supported. Is there a way to launch apps with their PID?

By the way: Thanks for maintaining this framework.

kasper commented 1 year ago

@ishiharas Interesting, thanks for the report and sorry for the trouble! I will need to look into this. Thanks for the kind words. ☺️