I think this does not work…
I tried it with launch bar, I startet it up without a dock icon
started this script from script editor and activated launchbar right away
delay 5
tell application "System Events" to get properties of every process
tell application (path to frontmost application as text)
display dialog (path to frontmost application as text)
end tell
Then I took a look to the output of the script…
The problem is:
Apps without a Dock-icon donnot have a menu bar, so their frontmost property will never be set.
So only this worked here for me:
delay 5
--tell application "System Events" to get properties of every process
tell application (path to frontmost application as text)
activate
display dialog (path to frontmost application as text)
end tell