Trying to open application the same way as dock command


I'm trying to create an action to open an application as if I clicked on it in the dock. I have tried both "Activate a Specific Application" and "Open Application". In both cases the app opens, but in a different format then when I click on it in the dock. However, if instead of using the KB trigger (a shortcut), I "try" the action in KB it opens as expected (as if I clicked on it in the dock). Can someone explain why the difference between opening the app in the dock, vs KB shortcut, vs "try" in KB?

The app I am trying to open is Zotero. When I open it using the KB defined action it seems to reset each time to a default state (it opens in a different corner, and has all the fields activated). When I open it from the dock, it remembers the last state.

Hi @igm2103, wäre das hier eine Lösung für Dich? Müsstest Dir das Script nur anpassen:

Dock activate Item <0A3E 200406T231622>.kmmacros (2,0 KB)

Dock activate Item <0A3E 200406T231622>


Thank you! I have received another solution which works as expected (as if the app was opened from the dock): I have created an AppleScript with activate application "Zotero" . I still don't understand why the Launch Application behaves differently.