Closed varp closed 4 years ago
I'm also use Alfred on my Mac, and when I'm activating the app by Alfred the app with closed main window opens and activates. That's weird... Can the both apps (Alfred and Kasper) use different APIs?
@varp Hello! When you close the window, its instance is released and therefore the window does not exist anymore. You have to create a new window for the app by opening it.
Thanks. now I use AppleScript to open an application's default window. The first, I just try to reopen app - reopenApp. In case of the Dash app and also many more it just did the trick. The second, for other case and the specific logic - AppleScript. I am really still confusing.... Why the underlying API that you use in Kasper dosen't offer API for opening a new window....
@varp Hi! You can open up a new window by doing the following:
App.launch('Mail', { focus: true });
This not obvious. Anyway, thank you so much. Closing the issue. And, AppleScript has the bonus in it - it returns all Finder windows from all Spaces - and it was important for my case.
@varp Thanks for the feedback, I’ll see if I can improve this!